Bug 1182072 - Add more diagnostic output to test failures caused by extra windows, r=jmaher,RyanVM a=test-only
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Tue, 29 Dec 2015 15:24:26 +0000
changeset 310620 5013542ebc3f1d8fb5adcd379f83722fb5a47c8f
parent 310619 ac8bea1130743a5243ec5c172ea1f6276c8f0bf8
child 310621 3fdf67c611e2837bb2779da9b25bcef681a3dbdb
push id5513
push userraliiev@mozilla.com
push dateMon, 25 Jan 2016 13:55:34 +0000
treeherdermozilla-beta@5ee97dd05b5c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmaher, RyanVM, test-only
bugs1182072
milestone45.0a2
Bug 1182072 - Add more diagnostic output to test failures caused by extra windows, r=jmaher,RyanVM a=test-only
testing/mochitest/browser-test.js
--- a/testing/mochitest/browser-test.js
+++ b/testing/mochitest/browser-test.js
@@ -300,17 +300,18 @@ 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 +
+                 " and title: " + win.document.title;
           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",