Bug 1182072 - Add more diagnostic output to test failures caused by extra windows, r?jmaher draft
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Tue, 29 Dec 2015 15:24:26 +0000
changeset 317888 3b840f40cb61364492c3e50467f88b80618ef388
parent 317882 6dbba51c24d2386624557368feaed125e5a32a63
child 512372 dc8cfaba986ec8b4e018d5bb61ab24d2fddacfd6
push id8777
push usergijskruitbosch@gmail.com
push dateTue, 29 Dec 2015 15:24:40 +0000
reviewersjmaher
bugs1182072
milestone46.0a1
Bug 1182072 - Add more diagnostic output to test failures caused by extra windows, r?jmaher
testing/mochitest/browser-test.js
--- a/testing/mochitest/browser-test.js
+++ b/testing/mochitest/browser-test.js
@@ -309,17 +309,17 @@ Tester.prototype = {
       if (win != window && !win.closed &&
           win.document.documentElement.getAttribute("id") != "browserTestHarness") {
         let type = win.document.documentElement.getAttribute("windowtype");
         switch (type) {
         case "navigator:browser":
           type = "browser window";
           break;
         case null:
-          type = "unknown window";
+          type = "unknown window with document URI: " + win.document.documentURI;
           break;
         }
         let msg = baseMsg.replace("{elt}", type);
         if (this.currentTest)
           this.currentTest.addResult(new testResult(false, msg, "", false));
         else
           this.dumper.structuredLogger.testEnd("browser-test.js",
                                                "FAIL",