Bug 1535708 - Separate out browser and plain mochitests into separate directories to aid ESLint. r=baku
authorMark Banner <standard8@mozilla.com>
Sat, 16 Mar 2019 02:40:40 +0000
changeset 464688 38849d9496e6
parent 464687 e19d324e5970
child 464689 8f2a6dbf221c
push id112465
push useraciure@mozilla.com
push dateSun, 17 Mar 2019 09:50:10 +0000
treeherdermozilla-inbound@e0861be8d6c0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1535708
milestone67.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 1535708 - Separate out browser and plain mochitests into separate directories to aid ESLint. r=baku Differential Revision: https://phabricator.services.mozilla.com/D23717
dom/cache/moz.build
dom/cache/test/browser/.eslintrc.js
dom/cache/test/browser/browser.ini
dom/cache/test/browser/browser_cache_pb_window.js
dom/cache/test/mochitest/.eslintrc.js
dom/cache/test/mochitest/browser.ini
dom/cache/test/mochitest/browser_cache_pb_window.js
dom/cache/test/mochitest/chrome.ini
dom/cache/test/mochitest/worker_driver.js
dom/cache/test/mochitest/worker_wrapper.js
--- a/dom/cache/moz.build
+++ b/dom/cache/moz.build
@@ -84,17 +84,17 @@ include('/ipc/chromium/chromium-config.m
 
 FINAL_LIBRARY = 'xul'
 
 MOCHITEST_MANIFESTS += [
     'test/mochitest/mochitest.ini',
 ]
 
 BROWSER_CHROME_MANIFESTS += [
-    'test/mochitest/browser.ini',
+    'test/browser/browser.ini',
 ]
 
 XPCSHELL_TESTS_MANIFESTS += [
     'test/xpcshell/xpcshell.ini',
 ]
 
 if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
copy from dom/cache/test/mochitest/.eslintrc.js
copy to dom/cache/test/browser/.eslintrc.js
--- a/dom/cache/test/mochitest/.eslintrc.js
+++ b/dom/cache/test/browser/.eslintrc.js
@@ -1,9 +1,7 @@
 "use strict";
 
 module.exports = {
   "extends": [
     "plugin:mozilla/browser-test",
-    "plugin:mozilla/chrome-test",
-    "plugin:mozilla/mochitest-test",
   ]
 };
rename from dom/cache/test/mochitest/browser.ini
rename to dom/cache/test/browser/browser.ini
rename from dom/cache/test/mochitest/browser_cache_pb_window.js
rename to dom/cache/test/browser/browser_cache_pb_window.js
--- a/dom/cache/test/mochitest/.eslintrc.js
+++ b/dom/cache/test/mochitest/.eslintrc.js
@@ -1,9 +1,7 @@
 "use strict";
 
 module.exports = {
   "extends": [
-    "plugin:mozilla/browser-test",
-    "plugin:mozilla/chrome-test",
     "plugin:mozilla/mochitest-test",
   ]
 };
deleted file mode 100644
--- a/dom/cache/test/mochitest/worker_driver.js
+++ b/dom/cache/test/mochitest/worker_driver.js
@@ -53,22 +53,16 @@ function workerTestExec(script) {
         event.data.permissions.forEach(function(permission) {
           result[permission] = SpecialPowers.hasPermission(permission, window.document);
         });
         worker.postMessage({
           type: "returnPermissions",
           permissions: event.data.permissions,
           result,
         });
-      } else if (event.data.type == "getVersion") {
-        let result = Services.appinfo.version;
-        worker.postMessage({
-          type: "returnVersion",
-          result,
-        });
       } else if (event.data.type == "getUserAgent") {
         worker.postMessage({
           type: "returnUserAgent",
           result: navigator.userAgent,
         });
       }
     };
 
--- a/dom/cache/test/mochitest/worker_wrapper.js
+++ b/dom/cache/test/mochitest/worker_wrapper.js
@@ -61,30 +61,16 @@ function workerTestGetPermissions(permis
   });
   client.postMessage({
     type: "getPermissions",
     context,
     permissions,
   });
 }
 
-function workerTestGetVersion(cb) {
-  addEventListener("message", function workerTestGetVersionCB(e) {
-    if (e.data.type !== "returnVersion") {
-      return;
-    }
-    removeEventListener("message", workerTestGetVersionCB);
-    cb(e.data.result);
-  });
-  client.postMessage({
-    context,
-    type: "getVersion",
-  });
-}
-
 function workerTestGetUserAgent(cb) {
   addEventListener("message", function workerTestGetUserAgentCB(e) {
     if (e.data.type !== "returnUserAgent") {
       return;
     }
     removeEventListener("message", workerTestGetUserAgentCB);
     cb(e.data.result);
   });