Closed
Bug 1242643
Opened 8 years ago
Closed 8 years ago
[e10s] Fix and re-enable /js/xpconnect/tests/browser_dead_object.js
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla47
People
(Reporter: tracy, Assigned: tracy)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 2 obsolete files)
3.32 KB,
patch
|
Details | Diff | Splinter Review |
Not sure this test case can be made to work in e10s. Here is what I have. Will isDeadWrapper work on a browser tab? My attempts to do this in a ContentTask did not work either. add_task(function* test() { let newTab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, "http://example.com"); yield BrowserTestUtils.removeTab(newTab); SimpleTest.executeSoon(function() { ok(Components.utils.isDeadWrapper(newTab), 'Browser should be dead.'); }); });
Assignee | ||
Comment 1•8 years ago
|
||
Bill, Is it possible to make this test case e10s compatible? For bug 773980, test that Components.utils.isDeadWrapper works as expected. From skip if comment in browser.ini: skip-if = e10s # Bug ?????? - test touches content (Components.utils.isDeadWrapper(contentWindow) - or maybe isDeadWrapper should take CPOWs into account?)
Flags: needinfo?(wmccloskey)
I think there are a couple ways to do this. One way would be to use a ContentTask, but change how the test makes the wrapper dead. Instead of removing the tab, you would navigate to a different page. The structure would look sort of like this: - Start up a content task. - The content task would first get a reference to some part of the old page. Maybe content.document. - Then it would navigate the page, perhaps with "content.location = 'http://example.com/a';". - Then you would test that the reference to the old page is dead with isDeadWrapper. However, one crucial piece is that the old page needs to have an onunload event handler. Otherwise it will go in the bfcache and we can't nuke it. So you'll need to make a test-specific page to start with and add an onunload event handler.
Flags: needinfo?(wmccloskey)
Assignee | ||
Comment 3•8 years ago
|
||
Attach the patch in try, that fails on Linux. https://treeherder.mozilla.org/#/jobs?repo=try&revision=b3fe6042437d
Assignee | ||
Comment 4•8 years ago
|
||
Solved issue of failures on Linux (had file path case issue) https://treeherder.mozilla.org/#/jobs?repo=try&revision=f9a3d53cfcb8
Assignee: nobody → twalker
Attachment #8725738 -
Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #8725866 -
Flags: review?(jmathies)
Comment 5•8 years ago
|
||
Comment on attachment 8725866 [details] [diff] [review] bug_1242643[2].patch Review of attachment 8725866 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/xpconnect/tests/browser/browser.ini @@ +1,4 @@ > [DEFAULT] > +support-files = > + browser_deadObjectOnUnload.html > + nit - whitespace line below the line with browser_deadObjectOnUnload.html ::: js/xpconnect/tests/browser/browser_dead_object.js @@ +16,5 @@ > + yield promise; > + return Components.utils.isDeadWrapper(doc); > + }); > + is(contentDocDead, true, "wrapper is dead"); > + yield BrowserTestUtils.removeTab(newTab); nit - trailing whitespace
Attachment #8725866 -
Flags: review?(jmathies) → review+
Assignee | ||
Comment 6•8 years ago
|
||
fixed nits on white space.
Attachment #8725866 -
Attachment is obsolete: true
Assignee | ||
Updated•8 years ago
|
Keywords: checkin-needed
Comment 8•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/d0d03be48b9e
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•