Bug 1381399 - Don't try to close reftest window if it's already closed, r=ato draft
authorJames Graham <james@hoppipolla.co.uk>
Thu, 29 Jun 2017 09:28:41 -0700
changeset 610605 d0a0ee3cfbfd43b1641c4f8853cc8683684f532d
parent 610604 5da9880c3eaad60aee4f831bda063803bf087c67
child 610606 3a9bbc6bcb364ac5e7e1fbf3491a8b36b98140fd
push id68953
push userbmo:james@hoppipolla.co.uk
push dateTue, 18 Jul 2017 15:15:22 +0000
reviewersato
bugs1381399
milestone56.0a1
Bug 1381399 - Don't try to close reftest window if it's already closed, r=ato If the run ended with the reftest window closed e.g. because the final test timed out, we shouldn't try to close it again, since that results in an error. MozReview-Commit-ID: 7FW96EkfgBG
testing/marionette/reftest.js
--- a/testing/marionette/reftest.js
+++ b/testing/marionette/reftest.js
@@ -123,17 +123,19 @@ min-width: 600px; min-height: 600px; max
     }
     doc.appendChild(browser);
     reftestWin.gBrowser = browser;
 
     return reftestWin;
   }
 
   abort() {
-    this.driver.close();
+    if (this.reftestWin) {
+      this.driver.close();
+    }
     this.reftestWin = null;
   }
 
   /**
    * Run a specific reftest.
    *
    * The assumed semantics are those of web-platform-tests where
    * references form a tree and each test must meet all the conditions