Backed out changeset c8f1dab5c9e5 (bug 305085)
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Wed, 24 Dec 2014 16:14:09 +0000
changeset 221203 cb25573de7e7003725d267d9a1c0da679fcca995
parent 221202 ea461c27bb0f9bf02d61284b31ec6cd42067ab8c
child 221204 6766cfb95e93b465b43b3e6616308e29c3a7f364
push id10580
push usergijskruitbosch@gmail.com
push dateWed, 24 Dec 2014 16:14:28 +0000
treeherderfx-team@cb25573de7e7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs305085
milestone37.0a1
backs outc8f1dab5c9e5e555243db1c41a4535e306f183c2
Backed out changeset c8f1dab5c9e5 (bug 305085)
browser/base/content/test/general/browser.ini
browser/base/content/test/general/browser_beforeunload_duplicate_dialogs.js
browser/base/content/test/general/file_double_close_tab.html
--- a/browser/base/content/test/general/browser.ini
+++ b/browser/base/content/test/general/browser.ini
@@ -119,18 +119,16 @@ skip-if = e10s # Bug 1093153 - no about:
 [browser_alltabslistener.js]
 [browser_autocomplete_a11y_label.js]
 skip-if = e10s # Bug 1101993 - times out for unknown reasons when run in the dir (works on its own)
 [browser_autocomplete_no_title.js]
 [browser_autocomplete_autoselect.js]
 [browser_autocomplete_oldschool_wrap.js]
 [browser_backButtonFitts.js]
 skip-if = os != "win" || e10s # The Fitts Law back button is only supported on Windows (bug 571454) / e10s - Bug 1099154: test touches content (attempts to add an event listener directly to the contentWindow)
-[browser_beforeunload_duplicate_dialogs.js]
-skip-if = e10s # bug 967873 means permitUnload doesn't work in e10s mode
 [browser_blob-channelname.js]
 [browser_bookmark_titles.js]
 skip-if = buildapp == 'mulet' || toolkit == "windows" || e10s # Disabled on Windows due to frequent failures (bugs 825739, 841341) / e10s - Bug 1094205 - places doesn't return the right thing in e10s mode, for some reason
 [browser_bug304198.js]
 skip-if = e10s
 [browser_bug321000.js]
 skip-if = true # browser_bug321000.js is disabled because newline handling is shaky (bug 592528)
 [browser_bug329212.js]
deleted file mode 100644
--- a/browser/base/content/test/general/browser_beforeunload_duplicate_dialogs.js
+++ /dev/null
@@ -1,44 +0,0 @@
-const TEST_PAGE = "http://mochi.test:8888/browser/browser/base/content/test/general/file_double_close_tab.html";
-
-let expectingDialog = false;
-function onTabModalDialogLoaded(node) {
-  ok(expectingDialog, "Should be expecting this dialog.");
-  expectingDialog = false;
-  // This accepts the dialog, closing it
-  node.Dialog.ui.button0.click();
-}
-
-
-// Listen for the dialog being created
-Services.obs.addObserver(onTabModalDialogLoaded, "tabmodal-dialog-loaded", false);
-registerCleanupFunction(() => {
-  Services.prefs.clearUserPref("browser.tabs.warnOnClose");
-  Services.obs.removeObserver(onTabModalDialogLoaded, "tabmodal-dialog-loaded");
-});
-
-add_task(function* closeLastTabInWindow() {
-  let newWin = yield promiseOpenAndLoadWindow({}, true);
-  let firstTab = newWin.gBrowser.selectedTab;
-  yield promiseTabLoadEvent(firstTab, TEST_PAGE);
-  let windowClosedPromise = promiseWindowClosed(newWin);
-  expectingDialog = true;
-  // close tab:
-  document.getAnonymousElementByAttribute(firstTab, "anonid", "close-button").click();
-  yield windowClosedPromise;
-  ok(!expectingDialog, "There should have been a dialog.");
-  ok(newWin.closed, "Window should be closed.");
-});
-
-add_task(function* closeWindowWithMultipleTabsIncludingOneBeforeUnload() {
-  Services.prefs.setBoolPref("browser.tabs.warnOnClose", false);
-  let newWin = yield promiseOpenAndLoadWindow({}, true);
-  let firstTab = newWin.gBrowser.selectedTab;
-  yield promiseTabLoadEvent(firstTab, TEST_PAGE);
-  yield promiseTabLoadEvent(newWin.gBrowser.addTab(), "http://example.com/");
-  let windowClosedPromise = promiseWindowClosed(newWin);
-  expectingDialog = true;
-  newWin.BrowserTryToCloseWindow();
-  yield windowClosedPromise;
-  ok(!expectingDialog, "There should have been a dialog.");
-  ok(newWin.closed, "Window should be closed.");
-});
--- a/browser/base/content/test/general/file_double_close_tab.html
+++ b/browser/base/content/test/general/file_double_close_tab.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <html>
   <head>
     <meta charset="utf-8">
-    <title>Test page that blocks beforeunload. Used in tests for bug 1050638 and bug 305085</title>
+    <title>Test for bug 1050638 - clicking tab close button twice should close tab even in beforeunload case</title>
   </head>
   <body>
     This page will block beforeunload. It should still be user-closable at all times.
     <script>
       window.onbeforeunload = function() {
         return "stop";
       };
     </script>