summaryrefslogtreecommitdiffstats
path: root/dom/base/test/browser_pagehide_on_tab_close.js
diff options
context:
space:
mode:
Diffstat (limited to 'dom/base/test/browser_pagehide_on_tab_close.js')
-rw-r--r--dom/base/test/browser_pagehide_on_tab_close.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/dom/base/test/browser_pagehide_on_tab_close.js b/dom/base/test/browser_pagehide_on_tab_close.js
new file mode 100644
index 000000000..0da7617e1
--- /dev/null
+++ b/dom/base/test/browser_pagehide_on_tab_close.js
@@ -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);
+}