Bug 690220 - Fix random orange in browser_bug638292.js. r=mbrubeck
authorMounir Lamouri <mounir.lamouri@gmail.com>
Thu, 29 Sep 2011 19:01:49 +0200
changeset 77864 9928fb9a32b1ccc6aa2b61cbb19525a638010d73
parent 77863 8417548adf12704b5cb198504253efd429e4f860
child 77865 9d8247091f4c27ffdade30ed81eee6dc6c3fb466
push id21245
push usereakhgari@mozilla.com
push dateThu, 29 Sep 2011 21:38:47 +0000
treeherdermozilla-central@6ced8d07826c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmbrubeck
bugs690220, 638292
milestone10.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 690220 - Fix random orange in browser_bug638292.js. r=mbrubeck
toolkit/mozapps/extensions/test/xpinstall/browser_bug638292.js
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_bug638292.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_bug638292.js
@@ -1,13 +1,21 @@
 // ----------------------------------------------------------------------------
 // Test whether an InstallTrigger.enabled is working
+
+let prefs = Cc["@mozilla.org/preferences-service;1"]
+              .getService(Components.interfaces.nsIPrefBranch);
+let gMultiplePopupsPref;
+
 function test() {
   waitForExplicitFinish();
 
+  gMultiplePopupsPref = prefs.getBoolPref("dom.block_multiple_popups");
+  prefs.setBoolPref("dom.block_multiple_popups", false);
+
   gBrowser.selectedTab = gBrowser.addTab();
   gBrowser.selectedBrowser.addEventListener("load", function() {
     gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true);
     waitForFocus(page_loaded, gBrowser.contentWindow);
   }, true);
   gBrowser.loadURI(TESTROOT + "bug638292.html");
 }
 
@@ -41,13 +49,14 @@ function page_loaded() {
     EventUtils.synthesizeMouseAtCenter(doc.getElementById("link2"), { }, gBrowser.contentWindow);
 
     check_load(function() {
       info("Clicking link 3");
       EventUtils.synthesizeMouseAtCenter(doc.getElementById("link3"), { button: 1 }, gBrowser.contentWindow);
 
       check_load(function() {
         gBrowser.removeCurrentTab();
+        prefs.setBoolPref("dom.block_multiple_popups", gMultiplePopupsPref);
         finish();
       });
     });
   });
 }