Bug 1209791 - TEST-UNEXPECTED-FAIL | /builds/slave/test/build/tests/mozmill/content-tabs/test-content-tab.js | test-content-tab.js::test_content_tab_onbeforeunload. r=mkmelin a=aleth
authoraleth <aleth@instantbird.org>
Sat, 03 Oct 2015 00:17:04 +0200
changeset 18541 071eec01aca961c0d603b94c41a89a17645f4af6
parent 18540 2435da3ea8b4e7e16b47bcfecc7dec83cc9d276c
child 18542 cf884253ba92f6c02147cefbbf8647e30bc72025
push id11354
push useraleth@instantbird.org
push dateWed, 04 Nov 2015 01:12:15 +0000
treeherdercomm-central@071eec01aca9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmkmelin, aleth
bugs1209791
Bug 1209791 - TEST-UNEXPECTED-FAIL | /builds/slave/test/build/tests/mozmill/content-tabs/test-content-tab.js | test-content-tab.js::test_content_tab_onbeforeunload. r=mkmelin a=aleth
mail/test/mozmill/content-tabs/test-content-tab.js
--- a/mail/test/mozmill/content-tabs/test-content-tab.js
+++ b/mail/test/mozmill/content-tabs/test-content-tab.js
@@ -150,19 +150,24 @@ function test_content_tab_default_favico
 
 function test_content_tab_onbeforeunload() {
   let count = mc.tabmail.tabContainer.childNodes.length;
   let tab = mc.tabmail.tabInfo[count-1];
   tab.browser.contentWindow.addEventListener("beforeunload", function (event) {
     event.returnValue = "Green llama in your car";
   }, false);
 
+  const interactionPref = "dom.require_user_interaction_for_beforeunload";
+  Services.prefs.setBoolPref(interactionPref, false);
+
   plan_for_modal_dialog("commonDialog", function (controller) {
     controller.window.document.documentElement.getButton("accept").doCommand();
   });
   mc.tabmail.closeTab(tab);
   wait_for_modal_dialog();
+
+  Services.prefs.clearUserPref(interactionPref);
 }
 
 // XXX todo
 // - test find bar
 // - window.close within tab
 // - zoom?