Web Inspector: LayoutTests/inspector should not have localStorage side effects
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Nov 2014 02:19:12 +0000 (02:19 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Nov 2014 02:19:12 +0000 (02:19 +0000)
commit1251e4638cfc3c74b098e67ff451ed40fd25a2b2
tree2a2a3b539994f48e6754cd0a906901a7de273eb6
parent22cf11d9b89a14245f84ca7b4638b3987c5a8510
Web Inspector: LayoutTests/inspector should not have localStorage side effects
https://bugs.webkit.org/show_bug.cgi?id=138895

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-11-19
Reviewed by Brian Burg.

When running inspector tests, do not restore/save WebInspector.Settings
to localStorage, as that will cause side effects. Instead each Setting
will be initialized with its default value and can be modified during
the run of the test.

* UserInterface/Base/Test.js:
(WebInspector.loaded):
Name the setting to match the normal setting name now that persistence
is not an issue.

* UserInterface/Models/Setting.js:
(WebInspector.Setting.prototype.get value):
(WebInspector.Setting.prototype.set value):
Do not restore/save when in tests.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@176376 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Base/Test.js
Source/WebInspectorUI/UserInterface/Models/Setting.js