Rewrite of a test from r156199, not relying on the devtools' localStorage

Chromium r231565 introduced clearance of the devtools' localStorage each
time the inspector is opened, which broke the original test.

R=pfeldman, vsevik

Review URL: https://codereview.chromium.org/48113018

git-svn-id: svn://svn.chromium.org/blink/trunk@160923 bbb929c8-8fbe-4397-9dbb-9b2b20218538