Bug 542950 [SeaMonkey trunk] mochitest-browser-chrome: new test fails with "browser_bug511456.js:99 - TypeError: win2 is undefined", browser_bug537449.js fails too. r=dtownsend

This commit is contained in:
Philip Chee 2010-06-09 11:57:53 +08:00
parent 9c0d6be952
commit 6afad7e984
2 changed files with 14 additions and 2 deletions

View File

@ -93,7 +93,13 @@ function test() {
Services.wm.addListener(Watcher);
var win2 = OpenBrowserWindow();
var chromeURL = Services.prefs.getCharPref("browser.chromeURL");
var argString = Cc["@mozilla.org/supports-string;1"]
.createInstance(Ci.nsISupportsString);
argString.data = "about:blank";
var win2 = Services.ww.openWindow(null, chromeURL, "_blank",
"chrome,dialog=no,all", argString);
win2.addEventListener("load", function() {
win2.removeEventListener("load", arguments.callee, false);
gBrowser.selectedTab = gBrowser.addTab(TEST_URL);

View File

@ -105,7 +105,13 @@ function test() {
Watcher.allowClose = true;
ok(Watcher.seen, "Should have seen a prompt dialog");
ok(!window.closed, "Shouldn't have closed the window");
var win2 = OpenBrowserWindow();
var chromeURL = Services.prefs.getCharPref("browser.chromeURL");
var argString = Cc["@mozilla.org/supports-string;1"]
.createInstance(Ci.nsISupportsString);
argString.data = "about:blank";
var win2 = Services.ww.openWindow(null, chromeURL, "_blank",
"chrome,dialog=no,all", argString);
ok(win2 != null, "Should have been able to open a new window");
win2.addEventListener("load", function() {
win2.removeEventListener("load", arguments.callee, false);