Bug 1126089 - Add test for pageload event on browser element when tab closed (r=smaug)

This commit is contained in:
Bill McCloskey 2015-03-03 16:50:51 -08:00
parent 4c2c54f407
commit 3f7c172b58
2 changed files with 19 additions and 0 deletions

View File

@ -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

View File

@ -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);
}