Bug 50076 - Web Inspector: LayoutTest/inspector/extnesions.html is flaky
Summary: Web Inspector: LayoutTest/inspector/extnesions.html is flaky
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Andrey Kosyakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-25 06:54 PST by Andrey Kosyakov
Modified: 2010-11-26 05:03 PST (History)
10 users (show)

See Also:


Attachments
patch (1.48 KB, patch)
2010-11-25 07:04 PST, Andrey Kosyakov
pfeldman: review-
Details | Formatted Diff | Diff
patch (1.53 KB, patch)
2010-11-25 07:18 PST, Andrey Kosyakov
pfeldman: review+
pfeldman: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Kosyakov 2010-11-25 06:54:39 PST
extension_testExtensionWatchSidebarExpression() sometimes dumps an empty sidebar pane, here's how it happens:
1. The test requests result of expression evaluated on inspected page to be rendered in sidebar pane
2. ExtensionWatchSidebarPane evaluates expression in page
3. When expression is evaluated, ExtensionWatchSidebarPane creates ObjectPropertiesSection, adds the result object and expands it the secion
4. ExtensionWatchSidebarPane dispatches a notification to client (test extension) on sidebar being updated.
5. ObjectPropertiesSection retrieves list of remote object properties in the inspected page

(4) happens asynchronously WRT (5), so test extension may dump an empty sidebar before remote properties list arrives.
Comment 1 Andrey Kosyakov 2010-11-25 07:04:36 PST
Created attachment 74874 [details]
patch
Comment 2 Pavel Feldman 2010-11-25 07:06:48 PST
Comment on attachment 74874 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=74874&action=review

> LayoutTests/inspector/extensions.html:63
> +            webInspector.inspectedWindow.eval("", bind(extension_dumpSidebarContent, null, nextTest));

Please use runAfterPendingDispatches.
Comment 3 Andrey Kosyakov 2010-11-25 07:18:55 PST
Created attachment 74875 [details]
patch
Comment 4 Andrey Kosyakov 2010-11-26 05:03:50 PST
Manually committed r72755: http://trac.webkit.org/changeset/72755