Bug 1095024: Port bug 987849 to mochitest-jetpack. r=jmaher
authorDave Townsend <dtownsend@oxymoronical.com>
Thu, 06 Nov 2014 12:16:15 -0800
changeset 214476 8094e9f641e3940b9e45df2802625367ece3acd4
parent 214475 b82e0ba1f833d0880fe7f8ac50ae176530abd773
child 214477 2b25041d6c06cc55a2fe25083ee9990e6e506972
push id51494
push userkwierso@gmail.com
push dateFri, 07 Nov 2014 03:08:20 +0000
treeherdermozilla-inbound@c4b831696f15 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmaher
bugs1095024, 987849
milestone36.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 1095024: Port bug 987849 to mochitest-jetpack. r=jmaher
testing/mochitest/jetpack-addon-harness.js
testing/mochitest/jetpack-package-harness.js
--- a/testing/mochitest/jetpack-addon-harness.js
+++ b/testing/mochitest/jetpack-addon-harness.js
@@ -101,17 +101,17 @@ function waitForResults() {
       Services.obs.removeObserver(arguments.callee, "sdk:test:results");
 
       resolve(JSON.parse(data));
     }, "sdk:test:results", false);
   });
 }
 
 // Runs tests for the add-on available at URL.
-let testAddon = Task.async(function*(url) {
+let testAddon = Task.async(function*({ url, expected }) {
   let addon = yield installAddon(url);
   let results = yield waitForResults();
   yield uninstallAddon(addon);
 
   return results;
 });
 
 // Sets a set of prefs for test add-ons
--- a/testing/mochitest/jetpack-package-harness.js
+++ b/testing/mochitest/jetpack-package-harness.js
@@ -1,11 +1,13 @@
 /* -*- js-indent-level: 2; tab-width: 2; indent-tabs-mode: nil -*- */
 const TEST_PACKAGE = "chrome://mochitests/content/";
-const TEST_ID = "jetpack-tests@mozilla.org";
+
+// Make sure to use the real add-on ID to get the e10s shims activated
+const TEST_ID = "mochikit@mozilla.org";
 
 var gConfig;
 
 if (Cc === undefined) {
   var Cc = Components.classes;
   var Ci = Components.interfaces;
   var Cu = Components.utils;
 }
@@ -21,17 +23,17 @@ window.addEventListener("load", function
   window.removeEventListener("load", testOnLoad);
   window.addEventListener("MozAfterPaint", function testOnMozAfterPaint() {
     window.removeEventListener("MozAfterPaint", testOnMozAfterPaint);
     setTimeout(testInit, 0);
   });
 });
 
 // Tests a single module
-function testModule(require, url) {
+function testModule(require, { url, expected }) {
   return new Promise(resolve => {
     let path = url.substring(TEST_PACKAGE.length);
 
     const { stdout } = require("sdk/system");
 
     const { runTests } = require("sdk/test/harness");
     const loaderModule = require("toolkit/loader");
     const options = require("sdk/test/options");