Bug 690220 - Fix random orange in browser_bug638292.js. r=mbrubeck

This commit is contained in:
Mounir Lamouri 2011-09-29 19:01:49 +02:00
parent a8d2514455
commit fd909f1fa4

View File

@ -1,8 +1,16 @@
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Test whether an InstallTrigger.enabled is working // Test whether an InstallTrigger.enabled is working
let prefs = Cc["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranch);
let gMultiplePopupsPref;
function test() { function test() {
waitForExplicitFinish(); waitForExplicitFinish();
gMultiplePopupsPref = prefs.getBoolPref("dom.block_multiple_popups");
prefs.setBoolPref("dom.block_multiple_popups", false);
gBrowser.selectedTab = gBrowser.addTab(); gBrowser.selectedTab = gBrowser.addTab();
gBrowser.selectedBrowser.addEventListener("load", function() { gBrowser.selectedBrowser.addEventListener("load", function() {
gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true); gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true);
@ -46,6 +54,7 @@ function page_loaded() {
check_load(function() { check_load(function() {
gBrowser.removeCurrentTab(); gBrowser.removeCurrentTab();
prefs.setBoolPref("dom.block_multiple_popups", gMultiplePopupsPref);
finish(); finish();
}); });
}); });