Bug 138895 - Web Inspector: LayoutTests/inspector should not have localStorage side effects
Summary: Web Inspector: LayoutTests/inspector should not have localStorage side effects
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Joseph Pecoraro
URL:
Keywords: DoNotImportToRadar
Depends on:
Blocks:
 
Reported: 2014-11-19 15:59 PST by Joseph Pecoraro
Modified: 2014-11-19 18:19 PST (History)
6 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (3.03 KB, patch)
2014-11-19 16:02 PST, Joseph Pecoraro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2014-11-19 15:59:38 PST
* SUMMARY
LayoutTests/inspector tests are modifying localStorage via WebInspector.Settings. In fact, it is loading settings from your actual inspector use. It should operate with a "clean" slate.

* STEPS TO REPRODUCE
1. shell> ./Tools/Scripts/run-webkit-tests ./LayoutTests/inspector/debugger/*.html
  => LayoutTests/inspector/debugger/probe-manager-add-remove-actions.html fails due to Breakpoint Action set in LayoutTests/inspector/debugger/breakpoint-action-eval.html

* NOTES
There are plenty of WebInspector.Settings lurking inside the different model agents. Running tests that toggle these might actually affect your normal browser use. That is inconvenient.
Comment 1 Joseph Pecoraro 2014-11-19 16:02:16 PST
Created attachment 241903 [details]
[PATCH] Proposed Fix
Comment 2 Joseph Pecoraro 2014-11-19 16:03:21 PST
FWIW, this was the failure seen in tests that no longer happens:

> CONSOLE MESSAGE: line 1: ReferenceError: Can't find variable: action
> Testing that the probe manager properly handles addition and removal of related probes.
> 
> inside breakpointActions a:(12) b:([object Object])
> Uncaught exception in test page: ReferenceError: Can't find variable: action [undefined:1]
Comment 3 Brian Burg 2014-11-19 17:39:11 PST
Comment on attachment 241903 [details]
[PATCH] Proposed Fix

This is good. (Do we actually have any tests besides the shadow DOM one which modify settings for test purposes?)
Comment 4 Joseph Pecoraro 2014-11-19 17:49:44 PST
Things like adding breakpoints / actions does modify settings inside DebuggerManager. For example, the case I filed this bug against.
Comment 5 WebKit Commit Bot 2014-11-19 18:19:08 PST
Comment on attachment 241903 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 241903

Committed r176376: <http://trac.webkit.org/changeset/176376>
Comment 6 WebKit Commit Bot 2014-11-19 18:19:12 PST
All reviewed patches have been landed.  Closing bug.