Closed Bug 1093404 Opened 10 years ago Closed 10 years ago

e10s - fix browser_bug462673.js

Categories

(Firefox :: Tabbed Browser, defect)

defect
Not set
normal
Points:
2

Tracking

()

RESOLVED FIXED
Firefox 39
Iteration:
39.2 - 23 Mar
Tracking Status
e10s + ---
firefox39 --- fixed

People

(Reporter: Gijs, Assigned: enndeakin)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

The test seems to depend on the content window opening another tab, which happens asynchronously, and which makes the test fail: 988 INFO TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/base/content/test/general/browser_bug462673.js | test_bug462673.html has opened a second tab - Got 1, expected 2 Stack trace: chrome://mochikit/content/browser-test.js:test_is:828 chrome://mochitests/content/browser/browser/base/content/test/general/browser_bug462673.js:runs<:3 chrome://mochitests/content/browser/browser/base/content/test/general/browser_bug462673.js:runOneTest/</</<:54 chrome://mochikit/content/browser-test.js:testScope/test_executeSoon/<.run:858 null:null:0 989 INFO TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/base/content/test/general/browser_bug462673.js | dependent tab is selected - Got [object XULElement], expected null Stack trace: chrome://mochikit/content/browser-test.js:test_is:828 chrome://mochitests/content/browser/browser/base/content/test/general/browser_bug462673.js:runs<:4 chrome://mochitests/content/browser/browser/base/content/test/general/browser_bug462673.js:runOneTest/</</<:54 chrome://mochikit/content/browser-test.js:testScope/test_executeSoon/<.run:858 null:null:0
Flags: qe-verify-
Flags: in-testsuite+
Flags: firefox-backlog+
Attached patch Fix testSplinter Review
Assignee: nobody → enndeakin
Status: NEW → ASSIGNED
Attachment #8576758 - Flags: review?(gijskruitbosch+bugs)
Iteration: --- → 39.2 - 23 Mar
Comment on attachment 8576758 [details] [diff] [review] Fix test Review of attachment 8576758 [details] [diff] [review]: ----------------------------------------------------------------- ::: browser/base/content/test/general/browser_bug462673.js @@ +9,5 @@ > + is(win.gBrowser.selectedTab, tab.nextSibling, "dependent tab is selected"); > + win.gBrowser.removeTab(tab); > + > + // Closing a tab will also close its parent chrome window, but async > + yield promiseWaitForCondition(() => win.closed); use yield promiseWindowWillBeClosed(win); instead to avoid the timeout-based loop here. @@ +35,2 @@ > win.close(); > + yield promiseWaitForCondition(() => win.closed); Instead of these two lines, use yield promiseWindowClosed(win), which calls win.close() and doesn't race if we ever start closing it sync from win.close...
Attachment #8576758 - Flags: review?(gijskruitbosch+bugs) → review+
(if you want to move both of these to BrowserTestUtils, that would be welcome!)
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 39
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: