зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1126089 - Add test for pageload event on browser element when tab closed (r=smaug)
This commit is contained in:
Родитель
a852f4d3bc
Коммит
56bd1b2a69
|
@ -5,6 +5,8 @@ skip-if = e10s # Bug ?????? - test directly touches content (contentWindow.ifram
|
|||
[browser_bug902350.js]
|
||||
skip-if = e10s # Bug ?????? - test e10s utils don't support load events from iframe etc, which this test relies on.
|
||||
[browser_messagemanager_loadprocessscript.js]
|
||||
[browser_pagehide_on_tab_close.js]
|
||||
skip-if = e10s # this tests non-e10s behavior. it's not expected to work in e10s.
|
||||
[browser_state_notifications.js]
|
||||
# skip-if = e10s # Bug ?????? - content-document-* notifications come while document's URI is still about:blank, but test expects real URL.
|
||||
skip-if = true # Intermittent failures - bug 987493. Restore the skip-if above once fixed
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
function test() {
|
||||
waitForExplicitFinish();
|
||||
|
||||
var tab = gBrowser.addTab();
|
||||
gBrowser.selectedTab = tab;
|
||||
|
||||
tab.linkedBrowser.addEventListener("load", function onload() {
|
||||
tab.linkedBrowser.removeEventListener("load", onload);
|
||||
|
||||
tab.linkedBrowser.addEventListener("pagehide", function() {
|
||||
ok(true, "got page hide event");
|
||||
finish();
|
||||
});
|
||||
|
||||
executeSoon(() => { gBrowser.removeTab(tab); });
|
||||
}, true);
|
||||
}
|
Загрузка…
Ссылка в новой задаче