Bug 138895

Summary: Web Inspector: LayoutTests/inspector should not have localStorage side effects
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: Web InspectorAssignee: Joseph Pecoraro <joepeck>
Status: RESOLVED FIXED    
Severity: Normal CC: burg, commit-queue, graouts, joepeck, timothy, webkit-bug-importer
Priority: P2 Keywords: DoNotImportToRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
[PATCH] Proposed Fix none

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.