Bug 120544

Summary: Web Inspector: inspector/storage-panel-dom-storage-update.html is flakey on the bots
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: Web Inspector (Deprecated)Assignee: Joseph Pecoraro <joepeck>
Status: RESOLVED INVALID    
Severity: Normal CC: commit-queue, dino, joepeck, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
[PATCH] Proposed Fix none

Description Joseph Pecoraro 2013-08-30 12:25:32 PDT
inspector/storage-panel-dom-storage-update.html is flakey on the bots.

It looks like the test is relying on InspectorTest.runAfterPendingDispatches(…) to run code after DOM Storage add/update/clears. However, those are not pending dispatches / results of actions, but DOMStorage agent events. So we should instead listen for pending events.
Comment 1 Radar WebKit Bug Importer 2013-08-30 12:25:40 PDT
<rdar://problem/14881605>
Comment 2 Joseph Pecoraro 2013-08-30 12:29:02 PDT
Created attachment 210147 [details]
[PATCH] Proposed Fix

The test could probably be simplified even more (removing most of the runAfterPendingDispatches could probably be removed) but ideally this would be converted to a real protocol test. I think this should fix the flakey ness though.
Comment 3 WebKit Commit Bot 2013-08-30 13:00:37 PDT
Comment on attachment 210147 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 210147

Committed r154907: <http://trac.webkit.org/changeset/154907>
Comment 4 WebKit Commit Bot 2013-08-30 13:00:39 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 Joseph Pecoraro 2013-08-30 13:44:58 PDT
Ahh, WebKit2 bot still complains about this:
<http://build.webkit.org/results/Apple%20MountainLion%20Release%20WK2%20(Tests)/r154907%20(11253)/results.html>

Investigating now that I can reproduce with -2.
Comment 6 Joseph Pecoraro 2013-08-30 14:13:06 PDT
So adding an extra log makes the test not timeout right now which makes very little sense at the moment.

            function viewUpdatedAfterAddition()
            {
                InspectorTest.addResult("viewUpdatedAfterAddition");
                InspectorTest.runAfterPendingDispatches(function() {
Comment 7 Joseph Pecoraro 2013-08-30 14:43:10 PDT
(In reply to comment #6)
> So adding an extra log makes the test not timeout right now which makes very little sense at the moment.
> 
>             function viewUpdatedAfterAddition()
>             {
>                 InspectorTest.addResult("viewUpdatedAfterAddition");
>                 InspectorTest.runAfterPendingDispatches(function() {

So apparently removing this runAfterPendingDispatches fixed things, as long as I then made running the event handlers aware of this. I have no idea why this caused any issue on WebKit 2. I have little interest in investigating that further right now when it was unnecessary anyways.
Comment 8 Joseph Pecoraro 2013-08-30 14:44:02 PDT
Landed follow-up fix: <http://trac.webkit.org/changeset/154911>
Comment 9 Alexey Proskuryakov 2013-09-17 14:48:59 PDT
This change made it so that the test times out 100% of the time on WebKit2. The test also sometimes times out on WK1. Marked accordingly in <http://trac.webkit.org/r156002>.

This doesn't happen when new Web Inspector is enabled (I don't know if the test runs properly then, but it's reported as passing).
Comment 10 Timothy Hatcher 2014-01-10 15:37:21 PST
Moving to the right component.
Comment 11 Brian Burg 2014-12-12 13:29:19 PST
Closing as invalid, as this bug pertains to the old inspector UI and/or its tests.
Please file a new bug (https://www.webkit.org/new-inspector-bug) if the bug/feature/issue is still relevant to WebKit trunk.