2014-11-19 Joseph Pecoraro <pecoraro@apple.com>
+ Web Inspector: LayoutTests/inspector should not have localStorage side effects
+ https://bugs.webkit.org/show_bug.cgi?id=138895
+
+ 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.
+
+2014-11-19 Joseph Pecoraro <pecoraro@apple.com>
+
Web Inspector: JSContext inspection Resource search does not work
https://bugs.webkit.org/show_bug.cgi?id=131252
// Perform one-time tasks.
WebInspector.CSSCompletions.requestCSSNameCompletions();
- this.showShadowDOMSetting = new WebInspector.Setting("test-show-shadow-dom", true);
+ // Global settings.
+ this.showShadowDOMSetting = new WebInspector.Setting("show-shadow-dom", true);
}
WebInspector.contentLoaded = function()
// Make a copy of the default value so changes to object values don't modify the default value.
this._value = JSON.parse(JSON.stringify(this._defaultValue));
- if (window.localStorage && this._localStorageKey in window.localStorage) {
+ if (!window.InspectorTest && window.localStorage && this._localStorageKey in window.localStorage) {
try {
this._value = JSON.parse(window.localStorage[this._localStorageKey]);
} catch(e) {
{
this._value = value;
- if (window.localStorage) {
+ if (!window.InspectorTest && window.localStorage) {
try {
// Use Object.shallowEqual to properly compare objects.
if (Object.shallowEqual(this._value, this._defaultValue))