amend-0 draft
authorKris Maglione <maglione.k@gmail.com>
Sun, 24 Jul 2016 16:09:26 -0700
changeset 392206 8ea7c05f9ee6d15916f3ca0405f085b5067e230d
parent 392205 2a8d8360e956113419ed6f2869411e45c77cbdbe
child 392207 57398b065d75c61a7de21cd71e0b45a81e9c9b70
push id23963
push usermaglione.k@gmail.com
push dateSun, 24 Jul 2016 23:16:27 +0000
milestone50.0a1
amend-0 MozReview-Commit-ID: 1UoSS1gZ8uB
toolkit/components/extensions/ExtensionXPCShellUtils.jsm
--- a/toolkit/components/extensions/ExtensionXPCShellUtils.jsm
+++ b/toolkit/components/extensions/ExtensionXPCShellUtils.jsm
@@ -87,20 +87,20 @@ class ExtensionWrapper {
         this.messageQueue.add([msg, ...args]);
         this.checkMessages();
       }
     });
     /* eslint-enable mozilla/balanced-listeners */
 
     this.testScope.do_register_cleanup(() => {
       if (this.state == "pending" || this.state == "running") {
-        this.testScope.ok(false, "Extension left running at test shutdown");
+        this.testScope.equal(this.state, "unloaded", "Extension left running at test shutdown");
         return this.unload();
       } else if (extension.state == "unloading") {
-        this.testScope.ok(false, "Extension not fully unloaded at test shutdown");
+        this.testScope.equal(this.state, "unloaded", "Extension not fully unloaded at test shutdown");
       }
     });
 
     this.testScope.do_print(`Extension loaded`);
   }
 
   startup() {
     if (this.state != "uninitialized") {
@@ -218,17 +218,17 @@ var ExtensionTestUtils = {
     this.profileDir = scope.do_get_profile();
 
     // We need to load at least one frame script into every message
     // manager to ensure that the scriptable wrapper for its global gets
     // created before we try to access it externally. If we don't, we
     // fail sanity checks on debug builds the first time we try to
     // create a wrapper, because we should never have a global without a
     // cached wrapper.
-    Services.mm.loadFrameScript("data:text/javascript,null", true);
+    Services.mm.loadFrameScript("data:text/javascript,//", true);
 
     scope.do_register_cleanup(() => {
       this.currentScope = null;
     });
   },
 
   addonManagerStarted: false,