Closed Bug 886057 Opened 7 years ago Closed 6 years ago

Intermittent browser_newtab_bug723121.js | grid is now locked - Got false, expected true

Categories

(Firefox :: Tabbed Browser, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
Firefox 25
Tracking Status
firefox24 --- fixed
firefox25 --- fixed

People

(Reporter: philor, Assigned: ttaubert)

Details

(Keywords: intermittent-failure)

Attachments

(1 file)

https://tbpl.mozilla.org/php/getParsedLog.php?id=24463580&tree=Mozilla-Central
Windows XP 32-bit mozilla-central pgo test mochitest-browser-chrome on 2013-06-22 03:24:06 PDT for push cea75ce9a559
slave: t-xp32-ix-023

03:27:24     INFO -  TEST-START | chrome://mochitests/content/browser/browser/base/content/test/newtab/browser_newtab_bug723121.js
03:27:24     INFO -  TEST-PASS | chrome://mochitests/content/browser/browser/base/content/test/newtab/browser_newtab_bug723121.js | grid is unlocked
03:27:24  WARNING -  TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/base/content/test/newtab/browser_newtab_bug723121.js | grid is now locked - Got false, expected true
03:27:24     INFO -  Stack trace:
03:27:24     INFO -      JS frame :: chrome://mochikit/content/browser-test.js :: test_is :: line 536
03:27:24     INFO -      JS frame :: chrome://mochitests/content/browser/browser/base/content/test/newtab/browser_newtab_bug723121.js :: checkGridLocked :: line 29
03:27:24     INFO -      JS frame :: chrome://mochitests/content/browser/browser/base/content/test/newtab/browser_newtab_bug723121.js :: runTests :: line 16
03:27:24     INFO -      JS frame :: chrome://mochitests/content/browser/browser/base/content/test/newtab/head.js :: <TOP_LEVEL> :: line 54
03:27:24     INFO -      JS frame :: chrome://mochikit/content/browser-test.js :: testScope/test_executeSoon/<.run :: line 565
03:27:24     INFO -      native frame :: <unknown filename> :: <TOP_LEVEL> :: line 0
03:27:24     INFO -  TEST-PASS | chrome://mochitests/content/browser/browser/base/content/test/newtab/browser_newtab_bug723121.js | grid isn't locked anymore
Hi Tim, can you please find an owner for this? It is a very frequent and recent regression.
Flags: needinfo?(ttaubert)
Assignee: nobody → ttaubert
Good news is that I can reproduce it locally with enough test runs. Bad news is I have no clue what happens here, yet. I'm working on it.
Flags: needinfo?(ttaubert)
OS: Windows XP → All
Hardware: x86 → All
Status: NEW → ASSIGNED
Turns out the dragstart event is not dispatched due to the frame tree not being up-to-date when calling nsIDOMWindowUtils.dispatchDOMEventViaPresShell().
The test was failing intermittently since newtab preloading was enabled. DocShell swapping (used by newtab preloading) happens synchronously and we should be able to dispatch events right after that happened.

Sometimes, the frame tree might not be up-to-date though because pending layout changes have not been processed, yet. nsIDOMWindowUtils.dispatchDOMEventViaPresShell() should therefore flush the layout before dispatching the event. The method is only used by tests.
Attachment #771101 - Flags: review?(bugs)
Attachment #771101 - Attachment description: make sure frame tree is up-to-date before dispatching events via PresShell → make sure frame tree is up-to-date before nsIDOMWindowUtils dispatches events via PresShell
Attachment #771101 - Flags: review?(bugs) → review+
https://hg.mozilla.org/mozilla-central/rev/4f0f68d919ba
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 25
Tim, can you please request beta uplift approval on this? Thanks :)
Flags: needinfo?(ttaubert)
Comment on attachment 771101 [details] [diff] [review]
make sure frame tree is up-to-date before nsIDOMWindowUtils dispatches events via PresShell

[Approval Request Comment]
Bug caused by (feature/regressing bug #): ???
User impact if declined: None.
Testing completed (on m-c, etc.): Works great since Firefox 25.
Risk to taking this patch (and alternatives if risky): Virtually no risk. Affects test suites, only. No risk if used outside because it only flushes pending layout changes.
String or IDL/UUID changes made by this patch: None.

This doesn't have any user-facing impact as we don't use nsIDOMWindowUtils.dispatchDOMEventViaPresShell() outside of test suites. The main intention here is to decrease the number of intermittent oranges on ESR.
Attachment #771101 - Flags: approval-mozilla-beta?
Attachment #771101 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.