Bug 730551. (Bv2) browser_bug638292.js: Check load target, Make SeaMonkey support more specific. r=bmcbride.
authorSerge Gautherie <sgautherie.bz@free.fr>
Tue, 06 Mar 2012 15:10:25 +0100
changeset 89304 3be651e9ac2aa795d03c66f5434bf430aca06871
parent 89303 d9e03e7c29dc252d50a899330d4978768ecf9db0
child 89305 730e026a21795c457ffbc9e307f6b124ab133e95
child 89306 c7e65c5fa1469a5939cf3f8b236a29b86e786ea0
push id22242
push userkgupta@mozilla.com
push dateWed, 14 Mar 2012 15:19:09 +0000
treeherdermozilla-central@936ef50fa498 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbmcbride
bugs730551, 638292
milestone13.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 730551. (Bv2) browser_bug638292.js: Check load target, Make SeaMonkey support more specific. r=bmcbride.
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
@@ -8,19 +8,23 @@ function test() {
     gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true);
     waitForFocus(page_loaded, gBrowser.contentWindow);
   }, true);
   gBrowser.loadURI(TESTROOT + "bug638292.html");
 }
 
 function check_load(aCallback) {
   gBrowser.addEventListener("load", function(aEvent) {
-    // SeaMonkey needs to deal with intermediate "about:blank" document(s).
-    if (!aEvent.target.location) {
-      info("Ignoring about:blank load. (Expected (a few times) on SeaMonkey only.)");
+    if (!gBrowser.browsers[2] ||
+        aEvent.target != gBrowser.browsers[2].contentDocument) {
+      // SeaMonkey tabbrowser needs to deal with additional loads.
+      if (navigator.userAgent.match(/ SeaMonkey\//))
+        info("Ignoring unrelated load on SeaMonkey. (Expected 2-3 times.)");
+      else
+        ok(false, "Ignoring unrelated load on Firefox. (Should never happen!)");
       return;
     }
 
     gBrowser.removeEventListener("load", arguments.callee, true);
 
     // Let the load handler complete
     executeSoon(function() {
       var doc = gBrowser.browsers[2].contentDocument;