Bug 1371065: Part 1 - Remove external references to the add-on SDK. r=Mossop,glandium
authorKris Maglione <maglione.k@gmail.com>
Tue, 12 Sep 2017 11:54:47 -0700
changeset 380337 f725597fa0b41856bd0d46b7bb2c4feaaca101c7
parent 380336 46b8854f1f8e710947d857af39e7933e08c7f868
child 380338 ff42bbbfcc3f20e2bc0fac0216419e43186f04d0
push id32486
push userarchaeopteryx@coole-files.de
push dateWed, 13 Sep 2017 09:28:25 +0000
treeherdermozilla-central@987326974635 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMossop, glandium
bugs1371065
milestone57.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 1371065: Part 1 - Remove external references to the add-on SDK. r=Mossop,glandium MozReview-Commit-ID: D5KyHcg8Ujk
.eslintignore
browser/base/content/test/static/browser_all_files_referenced.js
python/mozbuild/mozbuild/frontend/context.py
python/mozbuild/mozbuild/frontend/emitter.py
python/mozbuild/mozbuild/testing.py
taskcluster/ci/test/test-sets.yml
taskcluster/ci/test/tests.yml
taskcluster/taskgraph/try_option_syntax.py
testing/mach_commands.py
testing/mochitest/jar.mn
testing/mochitest/jetpack-addon-harness.js
testing/mochitest/jetpack-addon-overlay.xul
testing/mochitest/jetpack-package-harness.js
testing/mochitest/jetpack-package-overlay.xul
testing/mochitest/leaks.py
testing/mochitest/mach_commands.py
testing/mochitest/mochitest_options.py
testing/mochitest/moz.build
testing/mochitest/runtests.py
testing/mozharness/configs/unittests/linux_unittest.py
testing/mozharness/configs/unittests/mac_unittest.py
testing/mozharness/configs/unittests/win_taskcluster_unittest.py
testing/mozharness/configs/unittests/win_unittest.py
testing/mozharness/scripts/desktop_unittest.py
testing/testsuite-targets.mk
toolkit/components/addoncompat/ShimWaiver.jsm
toolkit/components/addoncompat/moz.build
toolkit/components/osfile/tests/xpcshell/test_loader.js
toolkit/components/osfile/tests/xpcshell/test_loader/module_test_loader.js
toolkit/components/osfile/tests/xpcshell/xpcshell.ini
toolkit/toolkit.mozbuild
tools/lint/py2.yml
tools/lint/py3.yml
--- a/.eslintignore
+++ b/.eslintignore
@@ -2,17 +2,16 @@
 **/node_modules/**/*.*
 
 # Exclude expected objdirs.
 obj*/**
 
 # We ignore all these directories by default, until we get them enabled.
 # If you are enabling a directory, please add directory specific exclusions
 # below.
-addon-sdk/**
 chrome/**
 config/**
 docshell/**
 editor/**
 embedding/**
 extensions/cookie/**
 extensions/spellcheck/**
 extensions/universalchardet/**
--- a/browser/base/content/test/static/browser_all_files_referenced.js
+++ b/browser/base/content/test/static/browser_all_files_referenced.js
@@ -166,18 +166,18 @@ var whitelist = [
   // Bug 1351078
   {file: "resource://gre/modules/Battery.jsm"},
   // Bug 1351079
   {file: "resource://gre/modules/ISO8601DateUtils.jsm"},
   // Bug 1337345
   {file: "resource://gre/modules/Manifest.jsm"},
   // Bug 1351097
   {file: "resource://gre/modules/accessibility/AccessFu.jsm"},
-  // Bug 1351637
-  {file: "resource://gre/modules/sdk/bootstrap.js"},
+  // Bug 1399216
+  {file: "resource://gre/modules/HiddenFrame.jsm"},
 ];
 
 whitelist = new Set(whitelist.filter(item =>
   ("isFromDevTools" in item) == isDevtools &&
   (!item.skipNightly || !AppConstants.NIGHTLY_BUILD) &&
   (!item.platforms || item.platforms.includes(AppConstants.platform))
 ).map(item => item.file));
 
--- a/python/mozbuild/mozbuild/frontend/context.py
+++ b/python/mozbuild/mozbuild/frontend/context.py
@@ -1523,24 +1523,16 @@ VARIABLES = {
     'A11Y_MANIFESTS': (ManifestparserManifestList, list,
         """List of manifest files defining a11y tests.
         """),
 
     'BROWSER_CHROME_MANIFESTS': (ManifestparserManifestList, list,
         """List of manifest files defining browser chrome tests.
         """),
 
-    'JETPACK_PACKAGE_MANIFESTS': (ManifestparserManifestList, list,
-        """List of manifest files defining jetpack package tests.
-        """),
-
-    'JETPACK_ADDON_MANIFESTS': (ManifestparserManifestList, list,
-        """List of manifest files defining jetpack addon tests.
-        """),
-
     'ANDROID_INSTRUMENTATION_MANIFESTS': (ManifestparserManifestList, list,
         """List of manifest files defining Android instrumentation tests.
         """),
 
     'FIREFOX_UI_FUNCTIONAL_MANIFESTS': (ManifestparserManifestList, list,
         """List of manifest files defining firefox-ui-functional tests.
         """),
 
--- a/python/mozbuild/mozbuild/frontend/emitter.py
+++ b/python/mozbuild/mozbuild/frontend/emitter.py
@@ -1251,25 +1251,16 @@ class TreeMetadataEmitter(LoggingMixin):
             obj = TestManifest(context, path, mpmanifest, flavor=flavor,
                 install_prefix=install_prefix,
                 relpath=mozpath.join(manifest_reldir, mozpath.basename(path)),
                 sources=manifest_sources,
                 dupe_manifest='dupe-manifest' in defaults)
 
             filtered = mpmanifest.tests
 
-            # Jetpack add-on tests are expected to be generated during the
-            # build process so they won't exist here.
-            if flavor != 'jetpack-addon':
-                missing = [t['name'] for t in filtered if not os.path.exists(t['path'])]
-                if missing:
-                    raise SandboxValidationError('Test manifest (%s) lists '
-                        'test that does not exist: %s' % (
-                        path, ', '.join(missing)), context)
-
             out_dir = mozpath.join(install_prefix, manifest_reldir)
             if 'install-to-subdir' in defaults:
                 # This is terrible, but what are you going to do?
                 out_dir = mozpath.join(out_dir, defaults['install-to-subdir'])
                 obj.manifest_obj_relpath = mozpath.join(manifest_reldir,
                                                         defaults['install-to-subdir'],
                                                         mozpath.basename(path))
 
--- a/python/mozbuild/mozbuild/testing.py
+++ b/python/mozbuild/mozbuild/testing.py
@@ -201,20 +201,16 @@ class TestResolver(MozbuildObject):
                                    test_defaults=os.path.join(self.topobjdir,
                                                               'test-defaults.pkl'))
 
         self._test_rewrites = {
             'a11y': os.path.join(self.topobjdir, '_tests', 'testing',
                 'mochitest', 'a11y'),
             'browser-chrome': os.path.join(self.topobjdir, '_tests', 'testing',
                 'mochitest', 'browser'),
-            'jetpack-package': os.path.join(self.topobjdir, '_tests', 'testing',
-                'mochitest', 'jetpack-package'),
-            'jetpack-addon': os.path.join(self.topobjdir, '_tests', 'testing',
-                'mochitest', 'jetpack-addon'),
             'chrome': os.path.join(self.topobjdir, '_tests', 'testing',
                 'mochitest', 'chrome'),
             'mochitest': os.path.join(self.topobjdir, '_tests', 'testing',
                 'mochitest', 'tests'),
             'web-platform-tests': os.path.join(self.topobjdir, '_tests', 'testing',
                                                'web-platform'),
             'xpcshell': os.path.join(self.topobjdir, '_tests', 'xpcshell'),
         }
@@ -286,18 +282,16 @@ class TestResolver(MozbuildObject):
 # package_tests indicates whether to package test files into the test
 #     package; suites that compile the test files should not install
 #     them into the test package.
 #
 TEST_MANIFESTS = dict(
     A11Y=('a11y', 'testing/mochitest', 'a11y', True),
     BROWSER_CHROME=('browser-chrome', 'testing/mochitest', 'browser', True),
     ANDROID_INSTRUMENTATION=('instrumentation', 'instrumentation', '.', False),
-    JETPACK_PACKAGE=('jetpack-package', 'testing/mochitest', 'jetpack-package', True),
-    JETPACK_ADDON=('jetpack-addon', 'testing/mochitest', 'jetpack-addon', False),
     FIREFOX_UI_FUNCTIONAL=('firefox-ui-functional', 'firefox-ui', '.', False),
     FIREFOX_UI_UPDATE=('firefox-ui-update', 'firefox-ui', '.', False),
     PUPPETEER_FIREFOX=('firefox-ui-functional', 'firefox-ui', '.', False),
     PYTHON_UNITTEST=('python', 'python', '.', False),
     CRAMTEST=('cram', 'cram', '.', False),
 
     # marionette tests are run from the srcdir
     # TODO(ato): make packaging work as for other test suites
--- a/taskcluster/ci/test/test-sets.yml
+++ b/taskcluster/ci/test/test-sets.yml
@@ -27,17 +27,16 @@ common-tests:
     - marionette-headless
     - mochitest
     - mochitest-a11y
     - mochitest-browser-chrome
     - mochitest-chrome
     - mochitest-clipboard
     - mochitest-devtools-chrome
     - mochitest-gpu
-    - mochitest-jetpack
     - mochitest-media
     - mochitest-webgl
     - reftest
     - reftest-no-accel
     - telemetry-tests-client
     - test-verify
     - xpcshell
 
@@ -161,17 +160,16 @@ windows-tests:
     - marionette-headless
     - mochitest
     - mochitest-a11y
     - mochitest-browser-chrome
     - mochitest-chrome
     - mochitest-clipboard
     - mochitest-devtools-chrome
     - mochitest-gpu
-    - mochitest-jetpack
     - mochitest-media
     - mochitest-webgl
     - reftest
     - reftest-no-accel
     - web-platform-tests
     - web-platform-tests-reftests
     - xpcshell
 
@@ -218,17 +216,16 @@ macosx64-tests:
     - marionette-headless
     - mochitest
     - mochitest-a11y
     - mochitest-browser-chrome
     - mochitest-chrome
     - mochitest-clipboard
     - mochitest-devtools-chrome
     - mochitest-gpu
-    - mochitest-jetpack
     - mochitest-media
     - mochitest-webgl
     - reftest
     - web-platform-tests
     - web-platform-tests-reftests
     - xpcshell
 
 macosx64-talos:
@@ -270,17 +267,16 @@ linux32-tests:
     - jsreftest
     - marionette
     - mochitest
     - mochitest-a11y
     - mochitest-browser-chrome
     - mochitest-chrome
     - mochitest-clipboard
     - mochitest-gpu
-    - mochitest-jetpack
     - mochitest-media
     - mochitest-webgl
     - reftest
     - reftest-no-accel
     - web-platform-tests
     - web-platform-tests-reftests
     - xpcshell
 
--- a/taskcluster/ci/test/tests.yml
+++ b/taskcluster/ci/test/tests.yml
@@ -872,44 +872,16 @@ mochitest-gpu:
                 extra-options:
                     - --mochitest-suite=plain-gpu,chrome-gpu,browser-chrome-gpu
     tier:
         by-test-platform:
             linux64-qr/.*: 1
             windows10-64-asan.*: 3
             default: default
 
-mochitest-jetpack:
-    description: "Mochitest jetpack run"
-    suite: mochitest/jetpack-package
-    treeherder-symbol: tc-M(JP)
-    loopback-video: true
-    e10s: false
-    max-run-time: 5400
-    mozharness:
-        mochitest-flavor: jetpack-package
-        script: desktop_unittest.py
-        no-read-buildbot-config: true
-        chunked: false
-        config:
-            by-test-platform:
-                windows.*:
-                    - unittests/win_taskcluster_unittest.py
-                macosx.*:
-                    - unittests/mac_unittest.py
-                linux.*:
-                    - unittests/linux_unittest.py
-                    - remove_executables.py
-        extra-options:
-            - --mochitest-suite=jetpack-package
-    tier:
-        by-test-platform:
-            windows10-64-asan.*: 3
-            default: default
-
 mochitest-media:
     description: "Mochitest media run"
     suite: mochitest/mochitest-media
     treeherder-symbol: tc-M(mda)
     max-run-time: 5400
     loopback-video: true
     instance-size:
         by-test-platform:
--- a/taskcluster/taskgraph/try_option_syntax.py
+++ b/taskcluster/taskgraph/try_option_syntax.py
@@ -86,17 +86,16 @@ UNITTEST_ALIASES = {
     'mochitest-dt': alias_prefix('mochitest-devtools-chrome'),
     'mochitest-e10s-dt': alias_prefix('mochitest-devtools-chrome-e10s'),
     'mochitest-gl': alias_prefix('mochitest-webgl'),
     'mochitest-gl-e10s': alias_prefix('mochitest-webgl-e10s'),
     'mochitest-gpu': alias_prefix('mochitest-gpu'),
     'mochitest-gpu-e10s': alias_prefix('mochitest-gpu-e10s'),
     'mochitest-clipboard': alias_prefix('mochitest-clipboard'),
     'mochitest-clipboard-e10s': alias_prefix('mochitest-clipboard-e10s'),
-    'mochitest-jetpack': alias_prefix('mochitest-jetpack'),
     'mochitest-media': alias_prefix('mochitest-media'),
     'mochitest-media-e10s': alias_prefix('mochitest-media-e10s'),
     'mochitest-vg': alias_prefix('mochitest-valgrind'),
     'reftest': alias_matches(r'^(plain-)?reftest.*$'),
     'reftest-no-accel': alias_matches(r'^(plain-)?reftest-no-accel.*$'),
     'reftests': alias_matches(r'^(plain-)?reftest.*$'),
     'reftests-e10s': alias_matches(r'^(plain-)?reftest-e10s.*$'),
     'reftest-stylo': alias_matches(r'^(plain-)?reftest-stylo.*$'),
--- a/testing/mach_commands.py
+++ b/testing/mach_commands.py
@@ -60,21 +60,16 @@ TEST_SUITES = {
         'mach_command': 'firefox-ui-functional',
         'kwargs': {},
     },
     'firefox-ui-update': {
         'aliases': ('Fxup',),
         'mach_command': 'firefox-ui-update',
         'kwargs': {},
     },
-    'jetpack': {
-        'aliases': ('J',),
-        'mach_command': 'jetpack-test',
-        'kwargs': {},
-    },
     'check-spidermonkey': {
         'aliases': ('Sm', 'sm'),
         'mach_command': 'check-spidermonkey',
         'kwargs': {'valgrind': False},
     },
     'mochitest-a11y': {
         'mach_command': 'mochitest',
         'kwargs': {'flavor': 'a11y', 'test_paths': None},
--- a/testing/mochitest/jar.mn
+++ b/testing/mochitest/jar.mn
@@ -1,17 +1,13 @@
 mochikit.jar:
 % content mochikit %content/
   content/browser-harness.xul (browser-harness.xul)
   content/browser-test.js (browser-test.js)
   content/browser-test-overlay.xul (browser-test-overlay.xul)
-  content/jetpack-package-harness.js (jetpack-package-harness.js)
-  content/jetpack-package-overlay.xul (jetpack-package-overlay.xul)
-  content/jetpack-addon-harness.js (jetpack-addon-harness.js)
-  content/jetpack-addon-overlay.xul (jetpack-addon-overlay.xul)
   content/chrome-harness.js (chrome-harness.js)
   content/mochitest-e10s-utils.js (mochitest-e10s-utils.js)
   content/shutdown-leaks-collector.js (shutdown-leaks-collector.js)
   content/ShutdownLeaksCollector.jsm (ShutdownLeaksCollector.jsm)
   content/harness.xul (harness.xul)
   content/redirect.html (redirect.html)
   content/server.js (server.js)
   content/chunkifyTests.js (chunkifyTests.js)
deleted file mode 100644
--- a/testing/mochitest/jetpack-addon-harness.js
+++ /dev/null
@@ -1,234 +0,0 @@
-/* -*- js-indent-level: 2; tab-width: 2; indent-tabs-mode: nil -*- */
-var gConfig;
-
-if (Cc === undefined) {
-  var Cc = Components.classes;
-  var Ci = Components.interfaces;
-  var Cu = Components.utils;
-}
-
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "Services",
-  "resource://gre/modules/Services.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "AddonManager",
-  "resource://gre/modules/AddonManager.jsm");
-
-// How long to wait for an add-on to uninstall before aborting
-const MAX_UNINSTALL_TIME = 10000;
-setTimeout(testInit, 0);
-
-var sdkpath = null;
-
-// Strip off the chrome prefix to get the actual path of the test directory
-function realPath(chrome) {
-  return chrome.substring("chrome://mochitests/content/jetpack-addon/".length)
-               .replace(".xpi", "");
-}
-
-const chromeRegistry = Cc["@mozilla.org/chrome/chrome-registry;1"]
-      .getService(Ci.nsIChromeRegistry);
-
-// Installs a single add-on returning a promise for when install is completed
-function installAddon(url) {
-  let chromeURL = Services.io.newURI(url);
-  let file = chromeRegistry.convertChromeURL(chromeURL)
-      .QueryInterface(Ci.nsIFileURL).file;
-
-  let addon;
-  const listener = {
-    onInstalling(_addon) {
-      addon = _addon;
-      // Set add-on's test options
-      const options = {
-        test: {
-          iterations: 1,
-          stop: false,
-          keepOpen: true,
-        },
-        profile: {
-          memory: false,
-          leaks: false,
-        },
-        output: {
-          logLevel: "verbose",
-          format: "tbpl",
-        },
-        console: {
-          logLevel: "info",
-        },
-      }
-      setPrefs("extensions." + addon.id + ".sdk", options);
-
-      // If necessary override the add-ons module paths to point somewhere
-      // else
-      if (sdkpath) {
-        let paths = {}
-        for (let path of ["dev", "diffpatcher", "framescript", "method", "node", "sdk", "toolkit"]) {
-          paths[path] = sdkpath + path;
-        }
-        setPrefs("extensions.modules." + addon.id + ".path", paths);
-      }
-    },
-  };
-  AddonManager.addAddonListener(listener);
-
-  return AddonManager.installTemporaryAddon(file)
-    .then(() => {
-      AddonManager.removeAddonListener(listener);
-      return addon;
-    });
-}
-
-// Uninstalls an add-on returning a promise for when it is gone
-function uninstallAddon(oldAddon) {
-  return new Promise(function(resolve, reject) {
-    AddonManager.addAddonListener({
-      onUninstalled: function(addon) {
-        if (addon.id != oldAddon.id)
-          return;
-
-        AddonManager.removeAddonListener(this);
-
-        dump("TEST-INFO | jetpack-addon-harness.js | Uninstalled test add-on " + addon.id + "\n");
-
-        // Some add-ons do async work on uninstall, we must wait for that to
-        // complete
-        setTimeout(resolve, 500);
-      }
-    });
-
-    oldAddon.uninstall();
-
-    // The uninstall should happen quickly, if not throw an exception
-    setTimeout(() => {
-      reject(new Error(`Addon ${oldAddon.id} failed to uninstall in a timely fashion.`));
-    }, MAX_UNINSTALL_TIME);
-  });
-}
-
-// Waits for a test add-on to signal it has completed its tests
-function waitForResults() {
-  return new Promise(function(resolve, reject) {
-    Services.obs.addObserver(function(subject, topic, data) {
-      Services.obs.removeObserver(arguments.callee, "sdk:test:results");
-
-      resolve(JSON.parse(data));
-    }, "sdk:test:results");
-  });
-}
-
-// Runs tests for the add-on available at URL.
-var testAddon = async function({ url }) {
-  dump("TEST-INFO | jetpack-addon-harness.js | Installing test add-on " + realPath(url) + "\n");
-  let addon = await installAddon(url);
-
-  let results = await waitForResults();
-
-  dump("TEST-INFO | jetpack-addon-harness.js | Uninstalling test add-on " + addon.id + "\n");
-  await uninstallAddon(addon);
-
-  dump("TEST-INFO | jetpack-addon-harness.js | Testing add-on " + realPath(url) + " is complete\n");
-  return results;
-};
-
-// Sets a set of prefs for test add-ons
-function setPrefs(root, options) {
-  Object.keys(options).forEach(id => {
-    const key = root + "." + id;
-    const value = options[id]
-    const type = typeof(value);
-
-    value === null ? void(0) :
-    value === undefined ? void(0) :
-    type === "boolean" ? Services.prefs.setBoolPref(key, value) :
-    type === "string" ? Services.prefs.setCharPref(key, value) :
-    type === "number" ? Services.prefs.setIntPref(key, parseInt(value)) :
-    type === "object" ? setPrefs(key, value) :
-    void(0);
-  });
-}
-
-function testInit() {
-  // Make sure to run the test harness for the first opened window only
-  if (Services.prefs.prefHasUserValue("testing.jetpackTestHarness.running"))
-    return;
-
-  Services.prefs.setBoolPref("testing.jetpackTestHarness.running", true);
-
-  // Get the list of tests to run
-  let config = readConfig();
-  getTestList(config, function(links) {
-    try {
-      let fileNames = [];
-      let fileNameRegexp = /.+\.xpi$/;
-      arrayOfTestFiles(links, fileNames, fileNameRegexp);
-
-      if (config.startAt || config.endAt) {
-        fileNames = skipTests(fileNames, config.startAt, config.endAt);
-      }
-
-      // Override the SDK modules if necessary
-      try {
-        let sdklibs = Services.prefs.getCharPref("extensions.sdk.path");
-        // sdkpath is a file path, make it a URI
-        let sdkfile = Cc["@mozilla.org/file/local;1"].
-                      createInstance(Ci.nsIFile);
-        sdkfile.initWithPath(sdklibs);
-        sdkpath = Services.io.newFileURI(sdkfile).spec;
-      }
-      catch (e) {
-        // Stick with the built-in modules
-      }
-
-      let passed = 0;
-      let failed = 0;
-
-      function finish() {
-        if (passed + failed == 0) {
-          dump("TEST-UNEXPECTED-FAIL | jetpack-addon-harness.js | " +
-               "No tests to run. Did you pass invalid test_paths?\n");
-        }
-        else {
-          dump("Jetpack Addon Test Summary\n");
-          dump("\tPassed: " + passed + "\n" +
-               "\tFailed: " + failed + "\n" +
-               "\tTodo: 0\n");
-        }
-
-        if (config.closeWhenDone) {
-          dump("TEST-INFO | jetpack-addon-harness.js | Shutting down.\n");
-
-          const appStartup = Cc['@mozilla.org/toolkit/app-startup;1'].
-                             getService(Ci.nsIAppStartup);
-          appStartup.quit(appStartup.eAttemptQuit);
-        }
-      }
-
-      function testNextAddon() {
-        if (fileNames.length == 0)
-          return finish();
-
-        let filename = fileNames.shift();
-        dump("TEST-INFO | jetpack-addon-harness.js | Starting test add-on " + realPath(filename.url) + "\n");
-        testAddon(filename).then(results => {
-          passed += results.passed;
-          failed += results.failed;
-        }).then(testNextAddon, error => {
-          // If something went wrong during the test then a previous test add-on
-          // may still be installed, this leaves us in an unexpected state so
-          // probably best to just abandon testing at this point
-          failed++;
-          dump("TEST-UNEXPECTED-FAIL | jetpack-addon-harness.js | Error testing " + realPath(filename.url) + ": " + error + "\n");
-          finish();
-        });
-      }
-
-      testNextAddon();
-    }
-    catch (e) {
-      dump("TEST-UNEXPECTED-FAIL | jetpack-addon-harness.js | error starting test harness (" + e + ")\n");
-      dump(e.stack);
-    }
-  });
-}
deleted file mode 100644
--- a/testing/mochitest/jetpack-addon-overlay.xul
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
-   - License, v. 2.0. If a copy of the MPL was not distributed with this
-   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<overlay id="jetpackTestOverlay"
-         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-  <script type="application/javascript" src="chrome://mochikit/content/chrome-harness.js"/>
-  <script type="application/javascript" src="chrome://mochikit/content/manifestLibrary.js"/>
-  <script type="application/javascript" src="chrome://mochikit/content/chunkifyTests.js"/>
-  <script type="application/javascript" src="chrome://mochikit/content/server.js"/>
-  <script type="application/javascript" src="chrome://mochikit/content/jetpack-addon-harness.js"/>
-</overlay>
deleted file mode 100644
--- a/testing/mochitest/jetpack-package-harness.js
+++ /dev/null
@@ -1,249 +0,0 @@
-/* -*- js-indent-level: 2; tab-width: 2; indent-tabs-mode: nil -*- */
-const TEST_PACKAGE = "chrome://mochitests/content/";
-
-// 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;
-}
-
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "Services",
-  "resource://gre/modules/Services.jsm");
-
-setTimeout(testInit, 0);
-
-// Tests a single module
-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");
-
-    function findAndRunTests(loader, nextIteration) {
-      const { TestRunner } = loaderModule.main(loader, "sdk/deprecated/unit-test");
-
-      const NOT_TESTS = ['setup', 'teardown'];
-      var runner = new TestRunner();
-
-      let tests = [];
-
-      let suiteModule;
-      try {
-        dump("TEST-INFO: " + path + " | Loading test module\n");
-        suiteModule = loaderModule.main(loader, "tests/" + path.substring(0, path.length - 3));
-      }
-      catch (e) {
-        // If `Unsupported Application` error thrown during test,
-        // skip the test suite
-        suiteModule = {
-          'test suite skipped': assert => assert.pass(e.message)
-        };
-      }
-
-      for (let name of Object.keys(suiteModule).sort()) {
-        if (NOT_TESTS.indexOf(name) != -1)
-          continue;
-
-        tests.push({
-          setup: suiteModule.setup,
-          teardown: suiteModule.teardown,
-          testFunction: suiteModule[name],
-          name: path + "." + name
-        });
-      }
-
-      runner.startMany({
-        tests: {
-          getNext: () => Promise.resolve(tests.shift())
-        },
-        stopOnError: options.stopOnError,
-        onDone: nextIteration
-      });
-    }
-
-    runTests({
-      findAndRunTests: findAndRunTests,
-      iterations: options.iterations,
-      filter: options.filter,
-      profileMemory: options.profileMemory,
-      stopOnError: options.stopOnError,
-      verbose: options.verbose,
-      parseable: options.parseable,
-      print: stdout.write,
-      onDone: resolve
-    });
-  });
-}
-
-// Sets the test prefs
-function setPrefs(root, options) {
-  Object.keys(options).forEach(id => {
-    const key = root + "." + id;
-    const value = options[id]
-    const type = typeof(value);
-
-    value === null ? void(0) :
-    value === undefined ? void(0) :
-    type === "boolean" ? Services.prefs.setBoolPref(key, value) :
-    type === "string" ? Services.prefs.setCharPref(key, value) :
-    type === "number" ? Services.prefs.setIntPref(key, parseInt(value)) :
-    type === "object" ? setPrefs(key, value) :
-    void(0);
-  });
-}
-
-function testInit() {
-  // Make sure to run the test harness for the first opened window only
-  if (Services.prefs.prefHasUserValue("testing.jetpackTestHarness.running"))
-    return;
-
-  Services.prefs.setBoolPref("testing.jetpackTestHarness.running", true);
-
-  // Need to set this very early, otherwise the false value gets cached in
-  // DOM bindings code.
-  Services.prefs.setBoolPref("dom.indexedDB.experimental", true);
-
-  // Get the list of tests to run
-  let config = readConfig();
-  getTestList(config, function(links) {
-    try {
-      let fileNames = [];
-      let fileNameRegexp = /test-.+\.js$/;
-      arrayOfTestFiles(links, fileNames, fileNameRegexp);
-
-      if (config.startAt || config.endAt) {
-        fileNames = skipTests(fileNames, config.startAt, config.endAt);
-      }
-
-      // The SDK assumes it is being run from resource URIs
-      let chromeReg = Cc["@mozilla.org/chrome/chrome-registry;1"].getService(Ci.nsIChromeRegistry);
-      let realPath = chromeReg.convertChromeURL(Services.io.newURI(TEST_PACKAGE));
-      let resProtocol = Cc["@mozilla.org/network/protocol;1?name=resource"].getService(Ci.nsIResProtocolHandler);
-      resProtocol.setSubstitution("jetpack-package-tests", realPath);
-
-      // Set the test options
-      const options = {
-        test: {
-          iterations: config.runUntilFailure ? config.repeat : 1,
-          stop: false,
-          keepOpen: true,
-        },
-        profile: {
-          memory: false,
-          leaks: false,
-        },
-        output: {
-          logLevel: "verbose",
-          format: "tbpl",
-        },
-        console: {
-          logLevel: "info",
-        },
-      }
-      setPrefs("extensions." + TEST_ID + ".sdk", options);
-
-      // Override the SDK modules if necessary
-      let sdkpath = "resource://gre/modules/commonjs/";
-      try {
-        let sdklibs = Services.prefs.getCharPref("extensions.sdk.path");
-        // sdkpath is a file path, make it a URI and map a resource URI to it
-        let sdkfile = Cc["@mozilla.org/file/local;1"].
-                      createInstance(Ci.nsIFile);
-        sdkfile.initWithPath(sdklibs);
-        let sdkuri = Services.io.newFileURI(sdkfile);
-        resProtocol.setSubstitution("jetpack-modules", sdkuri);
-        sdkpath = "resource://jetpack-modules/";
-      }
-      catch (e) {
-        // Stick with the built-in modules
-      }
-
-      const paths = {
-        "": sdkpath,
-        "tests/": "resource://jetpack-package-tests/",
-      };
-
-      // Create the base module loader to load the test harness
-      const loaderID = "toolkit/loader";
-      const loaderURI = paths[""] + loaderID + ".js";
-      const loaderModule = Cu.import(loaderURI, {}).Loader;
-
-      const modules = {};
-
-      // Manually set the loader's module cache to include itself;
-      // which otherwise fails due to lack of `Components`.
-      modules[loaderID] = loaderModule;
-      modules["@test/options"] = {};
-
-      let loader = loaderModule.Loader({
-        id: TEST_ID,
-        name: "addon-sdk",
-        version: "1.0",
-        loadReason: "install",
-        paths: paths,
-        modules: modules,
-        isNative: true,
-        rootURI: paths["tests/"],
-        prefixURI: paths["tests/"],
-        metadata: {},
-      });
-
-      const module = loaderModule.Module(loaderID, loaderURI);
-      const require = loaderModule.Require(loader, module);
-
-      // Wait until the add-on window is ready
-      require("sdk/addon/window").ready.then(() => {
-        let passed = 0;
-        let failed = 0;
-
-        function finish() {
-          if (passed + failed == 0) {
-            dump("TEST-UNEXPECTED-FAIL | jetpack-package-harness.js | " +
-                 "No tests to run. Did you pass invalid test_paths?\n");
-          }
-          else {
-            dump("Jetpack Package Test Summary\n");
-            dump("\tPassed: " + passed + "\n" +
-                 "\tFailed: " + failed + "\n" +
-                 "\tTodo: 0\n");
-          }
-
-          if (config.closeWhenDone) {
-            require("sdk/system").exit(failed == 0 ? 0 : 1);
-          }
-          else {
-            loaderModule.unload(loader, "shutdown");
-          }
-        }
-
-        function testNextModule() {
-          if (fileNames.length == 0)
-            return finish();
-
-          let filename = fileNames.shift();
-          testModule(require, filename).then(tests => {
-            passed += tests.passed;
-            failed += tests.failed;
-          }).then(testNextModule);
-        }
-
-        testNextModule();
-      });
-    }
-    catch (e) {
-      dump("TEST-UNEXPECTED-FAIL: jetpack-package-harness.js | error starting test harness (" + e + ")\n");
-      dump(e.stack);
-    }
-  });
-}
deleted file mode 100644
--- a/testing/mochitest/jetpack-package-overlay.xul
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
-   - License, v. 2.0. If a copy of the MPL was not distributed with this
-   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<overlay id="jetpackTestOverlay"
-         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-  <script type="application/javascript" src="chrome://mochikit/content/chrome-harness.js"/>
-  <script type="application/javascript" src="chrome://mochikit/content/manifestLibrary.js"/>
-  <script type="application/javascript" src="chrome://mochikit/content/chunkifyTests.js"/>
-  <script type="application/javascript" src="chrome://mochikit/content/server.js"/>
-  <script type="application/javascript" src="chrome://mochikit/content/jetpack-package-harness.js"/>
-</overlay>
--- a/testing/mochitest/leaks.py
+++ b/testing/mochitest/leaks.py
@@ -23,17 +23,17 @@ class ShutdownLeaks(object):
         self.leakedWindows = {}
         self.leakedDocShells = set()
         self.currentTest = None
         self.seenShutdown = set()
 
     def log(self, message):
         action = message['action']
 
-        # Remove 'log' when jetpack and clipboard are gone and/or structured.
+        # Remove 'log' when clipboard is gone and/or structured.
         if action in ('log', 'process_output'):
             line = message['message'] if action == 'log' else message['data']
 
             if line[2:11] == "DOMWINDOW":
                 self._logWindow(line)
             elif line[2:10] == "DOCSHELL":
                 self._logDocShell(line)
             elif line.startswith("Completed ShutdownLeaks collections in process"):
--- a/testing/mochitest/mach_commands.py
+++ b/testing/mochitest/mach_commands.py
@@ -111,17 +111,17 @@ class MochitestRunner(MozbuildObject):
         resolver = self._spawn(TestResolver)
         tests = list(resolver.resolve_tests(paths=test_paths, cwd=cwd))
         return tests
 
     def run_desktop_test(self, context, tests=None, suite=None, **kwargs):
         """Runs a mochitest.
 
         suite is the type of mochitest to run. It can be one of ('plain',
-        'chrome', 'browser', 'a11y', 'jetpack-package', 'jetpack-addon').
+        'chrome', 'browser', 'a11y').
         """
         # runtests.py is ambiguous, so we load the file/module manually.
         if 'mochitest' not in sys.modules:
             import imp
             path = os.path.join(self.mochitest_dir, 'runtests.py')
             with open(path, 'r') as fh:
                 imp.load_module('mochitest', fh, path,
                                 ('.py', 'r', imp.PY_SOURCE))
@@ -494,16 +494,8 @@ class DeprecatedCommands(MachCommandBase
 
     @Command('mochitest-devtools', category='testing', conditions=[REMOVED])
     def mochitest_devtools(self):
         pass
 
     @Command('mochitest-a11y', category='testing', conditions=[REMOVED])
     def mochitest_a11y(self):
         pass
-
-    @Command('jetpack-addon', category='testing', conditions=[REMOVED])
-    def jetpack_addon(self):
-        pass
-
-    @Command('jetpack-package', category='testing', conditions=[REMOVED])
-    def jetpack_package(self):
-        pass
--- a/testing/mochitest/mochitest_options.py
+++ b/testing/mochitest/mochitest_options.py
@@ -54,32 +54,16 @@ ALL_FLAVORS = {
     'browser-chrome': {
         'suite': 'browser',
         'aliases': ('browser', 'browser-chrome', 'mochitest-browser-chrome', 'bc'),
         'enabled_apps': ('firefox',),
         'extra_args': {
             'flavor': 'browser',
         }
     },
-    'jetpack-package': {
-        'suite': 'jetpack-package',
-        'aliases': ('jetpack-package', 'mochitest-jetpack-package', 'jpp'),
-        'enabled_apps': ('firefox',),
-        'extra_args': {
-            'flavor': 'jetpack-package',
-        }
-    },
-    'jetpack-addon': {
-        'suite': 'jetpack-addon',
-        'aliases': ('jetpack-addon', 'mochitest-jetpack-addon', 'jpa'),
-        'enabled_apps': ('firefox',),
-        'extra_args': {
-            'flavor': 'jetpack-addon',
-        }
-    },
     'a11y': {
         'suite': 'a11y',
         'aliases': ('a11y', 'mochitest-a11y', 'accessibility'),
         'enabled_apps': ('firefox',),
         'extra_args': {
             'flavor': 'a11y',
         }
     },
--- a/testing/mochitest/moz.build
+++ b/testing/mochitest/moz.build
@@ -45,20 +45,16 @@ TEST_HARNESS_FILES.testing.mochitest += 
     'bisection.py',
     'browser-harness.xul',
     'browser-test-overlay.xul',
     'browser-test.js',
     'chrome-harness.js',
     'chunkifyTests.js',
     'gen_template.pl',
     'harness.xul',
-    'jetpack-addon-harness.js',
-    'jetpack-addon-overlay.xul',
-    'jetpack-package-harness.js',
-    'jetpack-package-overlay.xul',
     'leaks.py',
     'mach_test_package_commands.py',
     'manifest.webapp',
     'manifestLibrary.js',
     'mochitest_options.py',
     'nested_setup.js',
     'pywebsocket_wrapper.py',
     'redirect.html',
--- a/testing/mochitest/runtests.py
+++ b/testing/mochitest/runtests.py
@@ -848,21 +848,18 @@ class MochitestDesktop(object):
         self.start_script_kwargs = {}
         self.urlOpts = []
 
         commandline.log_formatters["tbpl"] = (
             MochitestFormatter,
             "Mochitest specific tbpl formatter")
         self.log = commandline.setup_logging("mochitest", logger_options, {"tbpl": sys.stdout})
 
-        # Jetpack flavors still don't use the structured logger. We need to process their output
-        # slightly differently.
-        structured = not self.flavor.startswith('jetpack')
         self.message_logger = MessageLogger(
-                logger=self.log, buffering=quiet, structured=structured)
+                logger=self.log, buffering=quiet, structured=True)
 
         # Max time in seconds to wait for server startup before tests will fail -- if
         # this seems big, it's mostly for debug machines where cold startup
         # (particularly after a build) takes forever.
         self.SERVER_STARTUP_TIMEOUT = 180 if mozinfo.info.get('debug') else 90
 
         # metro browser sub process id
         self.browserProcessId = None
@@ -931,17 +928,17 @@ class MochitestDesktop(object):
             options.logFile = ""
         if not hasattr(options, 'fileLevel'):
             options.fileLevel = 'INFO'
 
         # allow relative paths for logFile
         if options.logFile:
             options.logFile = self.getLogFilePath(options.logFile)
 
-        if options.flavor in ('a11y', 'browser', 'chrome', 'jetpack-addon', 'jetpack-package'):
+        if options.flavor in ('a11y', 'browser', 'chrome'):
             self.makeTestConfig(options)
         else:
             if options.autorun:
                 self.urlOpts.append("autorun=1")
             if options.timeout:
                 self.urlOpts.append("timeout=%d" % options.timeout)
             if options.maxTimeouts:
                 self.urlOpts.append("maxTimeouts=%d" % options.maxTimeouts)
@@ -1023,21 +1020,16 @@ class MochitestDesktop(object):
         return flavor
 
     # This check can be removed when bug 983867 is fixed.
     def isTest(self, options, filename):
         allow_js_css = False
         if options.flavor == 'browser':
             allow_js_css = True
             testPattern = re.compile(r"browser_.+\.js")
-        elif options.flavor == 'jetpack-package':
-            allow_js_css = True
-            testPattern = re.compile(r"test-.+\.js")
-        elif options.flavor == 'jetpack-addon':
-            testPattern = re.compile(r".+\.xpi")
         elif options.flavor in ('a11y', 'chrome'):
             testPattern = re.compile(r"(browser|test)_.+\.(xul|html|js|xhtml)")
         else:
             testPattern = re.compile(r"test_")
 
         if not allow_js_css and (".js" in filename or ".css" in filename):
             return False
 
@@ -1071,17 +1063,17 @@ class MochitestDesktop(object):
                     self.TEST_PATH,
                     options.test_paths[0])):
                 testURL = "/".join([testURL, os.path.dirname(options.test_paths[0])])
             else:
                 testURL = "/".join([testURL, options.test_paths[0]])
 
         if options.flavor in ('a11y', 'chrome'):
             testURL = "/".join([testHost, self.CHROME_PATH])
-        elif options.flavor in ('browser', 'jetpack-addon', 'jetpack-package'):
+        elif options.flavor == 'browser':
             testURL = "about:blank"
         if options.nested_oop:
             testURL = "/".join([testHost, self.NESTED_OOP_TEST_PATH])
         return testURL
 
     def getTestsByScheme(self, options, testsToFilter=None, disabled=True):
         """ Build the url path to the specific test harness and test file or directory
             Build a manifest of tests to run and write out a json file for the harness to read
@@ -2427,17 +2419,17 @@ toolbar#nav-bar {
 
         if options.cleanupCrashes:
             mozcrash.cleanup_pending_crash_reports()
 
         tests = self.getActiveTests(options)
         self.logPreamble(tests)
         tests = [t for t in tests if 'disabled' not in t]
 
-        # Until we have all green, this does not run on jetpack*, or a11y (for perf reasons)
+        # Until we have all green, this does not run on a11y (for perf reasons)
         if not options.runByManifest:
             return self.runMochitests(options, [t['path'] for t in tests])
 
         # code for --run-by-manifest
         manifests = set(t['manifest'] for t in tests)
         result = 1  # default value, if no tests are run.
         origPrefs = options.extraPrefs[:]
         for m in sorted(manifests):
--- a/testing/mozharness/configs/unittests/linux_unittest.py
+++ b/testing/mozharness/configs/unittests/linux_unittest.py
@@ -197,19 +197,16 @@ config = {
         "browser-chrome-chunked": ["--flavor=browser", "--chunk-by-runtime"],
         "browser-chrome-addons": ["--flavor=browser", "--chunk-by-runtime", "--tag=addons"],
         "browser-chrome-coverage": ["--flavor=browser", "--chunk-by-runtime", "--timeout=1200"],
         "browser-chrome-screenshots": ["--flavor=browser", "--subsuite=screenshots"],
         "mochitest-gl": ["--subsuite=webgl"],
         "mochitest-devtools-chrome": ["--flavor=browser", "--subsuite=devtools"],
         "mochitest-devtools-chrome-chunked": ["--flavor=browser", "--subsuite=devtools", "--chunk-by-runtime"],
         "mochitest-devtools-chrome-coverage": ["--flavor=browser", "--subsuite=devtools", "--chunk-by-runtime", "--timeout=1200"],
-        "jetpack-package": ["--flavor=jetpack-package"],
-        "jetpack-package-clipboard": ["--flavor=jetpack-package", "--subsuite=clipboard"],
-        "jetpack-addon": ["--flavor=jetpack-addon"],
         "a11y": ["--flavor=a11y"],
     },
     # local reftest suites
     "all_reftest_suites": {
         "crashtest": {
             "options": ["--suite=crashtest"],
             "tests": ["tests/reftest/tests/testing/crashtest/crashtests.list"]
         },
@@ -292,17 +289,17 @@ config = {
         },
     ],
     "vcs_output_timeout": 1000,
     "minidump_save_path": "%(abs_work_dir)s/../minidumps",
     "buildbot_max_log_size": 209715200,
     "default_blob_upload_servers": [
         "https://blobupload.elasticbeanstalk.com",
     ],
-    "unstructured_flavors": {"mochitest": ['jetpack'],
+    "unstructured_flavors": {"mochitest": [],
                             "xpcshell": [],
                             "gtest": [],
                             "mozmill": [],
                             "cppunittest": [],
                             "jittest": [],
                             "mozbase": [],
                             },
     "blob_uploader_auth_file": os.path.join(os.getcwd(), "oauth.txt"),
--- a/testing/mozharness/configs/unittests/mac_unittest.py
+++ b/testing/mozharness/configs/unittests/mac_unittest.py
@@ -160,19 +160,16 @@ config = {
         "browser-chrome-gpu": ["--flavor=browser", "--subsuite=gpu"],
         "browser-chrome-clipboard": ["--flavor=browser", "--subsuite=clipboard"],
         "browser-chrome-chunked": ["--flavor=browser", "--chunk-by-runtime"],
         "browser-chrome-addons": ["--flavor=browser", "--chunk-by-runtime", "--tag=addons"],
         "browser-chrome-screenshots": ["--flavor=browser", "--subsuite=screenshots"],
         "mochitest-gl": ["--subsuite=webgl"],
         "mochitest-devtools-chrome": ["--flavor=browser", "--subsuite=devtools"],
         "mochitest-devtools-chrome-chunked": ["--flavor=browser", "--subsuite=devtools", "--chunk-by-runtime"],
-        "jetpack-package": ["--flavor=jetpack-package"],
-        "jetpack-package-clipboard": ["--flavor=jetpack-package", "--subsuite=clipboard"],
-        "jetpack-addon": ["--flavor=jetpack-addon"],
         "a11y": ["--flavor=a11y"],
     },
     # local reftest suites
     "all_reftest_suites": {
         "crashtest": {
             'options': ["--suite=crashtest"],
             'tests': ["tests/reftest/tests/testing/crashtest/crashtests.list"]
         },
@@ -239,17 +236,17 @@ config = {
         },
     ],
     "vcs_output_timeout": 1000,
     "minidump_save_path": "%(abs_work_dir)s/../minidumps",
     "buildbot_max_log_size": 52428800,
     "default_blob_upload_servers": [
         "https://blobupload.elasticbeanstalk.com",
     ],
-    "unstructured_flavors": {"mochitest": ['jetpack'],
+    "unstructured_flavors": {"mochitest": [],
                             "xpcshell": [],
                             "gtest": [],
                             "mozmill": [],
                             "cppunittest": [],
                             "jittest": [],
                             "mozbase": [],
                             },
     "blob_uploader_auth_file": os.path.join(os.getcwd(), "oauth.txt"),
--- a/testing/mozharness/configs/unittests/win_taskcluster_unittest.py
+++ b/testing/mozharness/configs/unittests/win_taskcluster_unittest.py
@@ -173,19 +173,16 @@ config = {
         "browser-chrome-clipboard": ["--flavor=browser", "--subsuite=clipboard"],
         "browser-chrome-chunked": ["--flavor=browser", "--chunk-by-runtime"],
         "browser-chrome-addons": ["--flavor=browser", "--chunk-by-runtime", "--tag=addons"],
         "browser-chrome-screenshots": ["--flavor=browser", "--subsuite=screenshots"],
         "mochitest-gl": ["--subsuite=webgl"],
         "mochitest-devtools-chrome": ["--flavor=browser", "--subsuite=devtools"],
         "mochitest-devtools-chrome-chunked": ["--flavor=browser", "--subsuite=devtools", "--chunk-by-runtime"],
         "mochitest-metro-chrome": ["--flavor=browser", "--metro-immersive"],
-        "jetpack-package": ["--flavor=jetpack-package"],
-        "jetpack-package-clipboard": ["--flavor=jetpack-package", "--subsuite=clipboard"],
-        "jetpack-addon": ["--flavor=jetpack-addon"],
         "a11y": ["--flavor=a11y"],
     },
     # local reftest suites
     "all_reftest_suites": {
         "crashtest": {
             'options': ["--suite=crashtest"],
             'tests': ["tests/reftest/tests/testing/crashtest/crashtests.list"]
         },
--- a/testing/mozharness/configs/unittests/win_unittest.py
+++ b/testing/mozharness/configs/unittests/win_unittest.py
@@ -172,19 +172,16 @@ config = {
         "browser-chrome-clipboard": ["--flavor=browser", "--subsuite=clipboard"],
         "browser-chrome-chunked": ["--flavor=browser", "--chunk-by-runtime"],
         "browser-chrome-addons": ["--flavor=browser", "--chunk-by-runtime", "--tag=addons"],
         "browser-chrome-screenshots": ["--flavor=browser", "--subsuite=screenshots"],
         "mochitest-gl": ["--subsuite=webgl"],
         "mochitest-devtools-chrome": ["--flavor=browser", "--subsuite=devtools"],
         "mochitest-devtools-chrome-chunked": ["--flavor=browser", "--subsuite=devtools", "--chunk-by-runtime"],
         "mochitest-metro-chrome": ["--flavor=browser", "--metro-immersive"],
-        "jetpack-package": ["--flavor=jetpack-package"],
-        "jetpack-package-clipboard": ["--flavor=jetpack-package", "--subsuite=clipboard"],
-        "jetpack-addon": ["--flavor=jetpack-addon"],
         "a11y": ["--flavor=a11y"],
     },
     # local reftest suites
     "all_reftest_suites": {
         "crashtest": {
             'options': ["--suite=crashtest"],
             'tests': ["tests/reftest/tests/testing/crashtest/crashtests.list"]
         },
@@ -262,17 +259,17 @@ config = {
         },
     ],
     "vcs_output_timeout": 1000,
     "minidump_save_path": "%(abs_work_dir)s/../minidumps",
     "buildbot_max_log_size": 52428800,
     "default_blob_upload_servers": [
         "https://blobupload.elasticbeanstalk.com",
     ],
-    "unstructured_flavors": {"mochitest": ['jetpack'],
+    "unstructured_flavors": {"mochitest": [],
                             "xpcshell": [],
                             "gtest": [],
                             "mozmill": [],
                             "cppunittest": [],
                             "jittest": [],
                             "mozbase": [],
                             },
     "blob_uploader_auth_file": os.path.join(os.getcwd(), "oauth.txt"),
--- a/testing/mozharness/scripts/desktop_unittest.py
+++ b/testing/mozharness/scripts/desktop_unittest.py
@@ -484,18 +484,17 @@ class DesktopUnittest(TestingMixin, Merc
 
         return suites
 
     def _query_try_flavor(self, category, suite):
         flavors = {
             "mochitest": [("plain.*", "mochitest"),
                           ("browser-chrome.*", "browser-chrome"),
                           ("mochitest-devtools-chrome.*", "devtools-chrome"),
-                          ("chrome", "chrome"),
-                          ("jetpack.*", "jetpack")],
+                          ("chrome", "chrome")],
             "xpcshell": [("xpcshell", "xpcshell")],
             "reftest": [("reftest", "reftest"),
                         ("crashtest", "crashtest")]
         }
         for suite_pattern, flavor in flavors.get(category, []):
             if re.compile(suite_pattern).match(suite):
                 return flavor
 
--- a/testing/testsuite-targets.mk
+++ b/testing/testsuite-targets.mk
@@ -86,34 +86,30 @@ REMOTE_CPPUNITTESTS = \
 	  --localLib=$(DEPTH)/dist/fennec \
 	  --deviceIP=${TEST_DEVICE} \
 	  $(TEST_PATH) $(EXTRA_TEST_ARGS)
 
 # Usage: |make [TEST_PATH=...] [EXTRA_TEST_ARGS=...] cppunittests-remote|.
 cppunittests-remote:
 	$(call REMOTE_CPPUNITTESTS);
 
-jetpack-tests:
-	cd $(topsrcdir)/addon-sdk/source && $(PYTHON) bin/cfx -b $(abspath $(browser_path)) --parseable testpkgs
-
 pgo-profile-run:
 	$(PYTHON) $(topsrcdir)/build/pgo/profileserver.py $(EXTRA_TEST_ARGS)
 
 # Package up the tests and test harnesses
 include $(topsrcdir)/toolkit/mozapps/installer/package-name.mk
 
 PKG_STAGE = $(DIST)/test-stage
 
 stage-all: \
   stage-config \
   stage-mach \
   stage-extensions \
   stage-mochitest \
   stage-jstests \
-  stage-jetpack \
   test-packages-manifest \
   $(NULL)
 ifdef MOZ_WEBRTC
 stage-all: stage-steeplechase
 endif
 
 ifdef COMPILE_ENVIRONMENT
 stage-all: stage-cppunittests
@@ -174,17 +170,16 @@ endif
 # make-stage-dir is a prerequisite to all the stage-* targets in testsuite-targets.mk.
 make-stage-dir: install-test-files
 	rm -rf $(PKG_STAGE)
 	$(NSINSTALL) -D $(PKG_STAGE)
 	$(NSINSTALL) -D $(PKG_STAGE)/bin
 	$(NSINSTALL) -D $(PKG_STAGE)/bin/components
 	$(NSINSTALL) -D $(PKG_STAGE)/certs
 	$(NSINSTALL) -D $(PKG_STAGE)/config
-	$(NSINSTALL) -D $(PKG_STAGE)/jetpack
 	$(NSINSTALL) -D $(PKG_STAGE)/modules
 	$(NSINSTALL) -D $(PKG_STAGE)/tools/mach
 
 stage-config: make-stage-dir
 	$(NSINSTALL) -D $(PKG_STAGE)/config
 	@(cd $(topsrcdir)/testing/config && tar $(TAR_CREATE_FLAGS) - *) | (cd $(PKG_STAGE)/config && tar -xf -)
 
 stage-mach: make-stage-dir
@@ -226,19 +221,16 @@ endif
 	cp $(DEPTH)/mozinfo.json $(PKG_STAGE)/gtest
 
 stage-android: make-stage-dir
 	$(NSINSTALL) $(topsrcdir)/mobile/android/fonts $(DEPTH)/_tests/reftest
 	$(NSINSTALL) $(topsrcdir)/mobile/android/fonts $(DEPTH)/_tests/testing/mochitest
 	$(NSINSTALL) -D $(DEPTH)/_tests/reftest/hyphenation
 	$(NSINSTALL) $(wildcard $(topsrcdir)/intl/locales/*/hyphenation/*.dic) $(DEPTH)/_tests/reftest/hyphenation
 
-stage-jetpack: make-stage-dir
-	$(MAKE) -C $(DEPTH)/addon-sdk stage-tests-package
-
 CPP_UNIT_TEST_BINS=$(wildcard $(DIST)/cppunittests/*)
 
 stage-cppunittests: make-stage-dir
 	$(NSINSTALL) -D $(PKG_STAGE)/cppunittest
 ifdef STRIP_COMPILED_TESTS
 	$(foreach bin,$(CPP_UNIT_TEST_BINS),$(OBJCOPY) $(or $(STRIP_FLAGS),--strip-unneeded) $(bin) $(bin:$(DIST)/cppunittests/%=$(PKG_STAGE)/cppunittest/%);)
 else
 	cp -RL $(CPP_UNIT_TEST_BINS) $(PKG_STAGE)/cppunittest
@@ -283,14 +275,13 @@ check::
   package-tests-prepare-dest \
   package-tests-common \
   make-stage-dir \
   stage-all \
   stage-config \
   stage-mochitest \
   stage-jstests \
   stage-android \
-  stage-jetpack \
   stage-steeplechase \
   stage-instrumentation-tests \
   test-packages-manifest \
   check \
   $(NULL)
deleted file mode 100644
--- a/toolkit/components/addoncompat/ShimWaiver.jsm
+++ /dev/null
@@ -1,15 +0,0 @@
-// This Source Code Form is subject to the terms of the Mozilla Public
-// License, v. 2.0. If a copy of the MPL was not distributed with this
-// file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-this.EXPORTED_SYMBOLS = ["ShimWaiver"];
-
-this.ShimWaiver = {
-  getProperty(obj, prop) {
-    let rv = obj[prop];
-    if (rv instanceof Function) {
-      rv = rv.bind(obj);
-    }
-    return rv;
-  }
-};
--- a/toolkit/components/addoncompat/moz.build
+++ b/toolkit/components/addoncompat/moz.build
@@ -15,10 +15,9 @@ EXTRA_COMPONENTS += [
     'multiprocessShims.js',
 ]
 
 EXTRA_JS_MODULES += [
     'CompatWarning.jsm',
     'Prefetcher.jsm',
     'RemoteAddonsChild.jsm',
     'RemoteAddonsParent.jsm',
-    'ShimWaiver.jsm'
 ]
deleted file mode 100644
--- a/toolkit/components/osfile/tests/xpcshell/test_loader.js
+++ /dev/null
@@ -1,33 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-/**
- * Test that OS.File can be loaded using the CommonJS loader.
- */
-
-var { Loader } = Components.utils.import("resource://gre/modules/commonjs/toolkit/loader.js", {});
-
-
-add_task(async function() {
-  let dataDir = Services.io.newFileURI(do_get_file("test_loader/", true)).spec + "/";
-  let loader = Loader.Loader({
-    paths: {"": dataDir }
-  });
-
-  let require = Loader.Require(loader, Loader.Module("module_test_loader", "foo"));
-  do_print("Require is ready");
-  try {
-    require("module_test_loader");
-  } catch (error) {
-    dump("Bootstrap error: " +
-         (error.message ? error.message : String(error)) + "\n" +
-         (error.stack || error.fileName + ": " + error.lineNumber) + "\n");
-
-    throw error;
-  }
-
-  do_print("Require has worked");
-});
-
deleted file mode 100644
--- a/toolkit/components/osfile/tests/xpcshell/test_loader/module_test_loader.js
+++ /dev/null
@@ -1,9 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-// Load OS.File from a module loaded with the CommonJS/addon-sdk loader
-
-var {Cu} = require("chrome");
-Cu.import("resource://gre/modules/osfile.jsm");
--- a/toolkit/components/osfile/tests/xpcshell/xpcshell.ini
+++ b/toolkit/components/osfile/tests/xpcshell/xpcshell.ini
@@ -1,21 +1,17 @@
 [DEFAULT]
 head = head.js
 
-support-files =
-  test_loader/module_test_loader.js
-
 [test_compression.js]
 [test_constants.js]
 [test_creationDate.js]
 [test_duration.js]
 [test_exception.js]
 [test_file_URL_conversion.js]
-[test_loader.js]
 [test_logging.js]
 [test_makeDir.js]
 [test_open.js]
 [test_osfile_async.js]
 [test_osfile_async_append.js]
 [test_osfile_async_bytes.js]
 [test_osfile_async_copy.js]
 [test_osfile_async_flush.js]
--- a/toolkit/toolkit.mozbuild
+++ b/toolkit/toolkit.mozbuild
@@ -137,18 +137,16 @@ DIRS += [
     '/startupcache',
     '/js/ductwork/debugger',
     '/other-licenses/snappy',
 ]
 
 if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
     DIRS += ['/toolkit/system/gnome']
 
-DIRS += ['/addon-sdk']
-
 if CONFIG['ENABLE_MARIONETTE']:
     DIRS += [
         '/testing/firefox-ui',
         '/testing/marionette',
     ]
 
 if CONFIG['ENABLE_GECKODRIVER']:
     DIRS += ['/testing/geckodriver']
--- a/tools/lint/py2.yml
+++ b/tools/lint/py2.yml
@@ -1,15 +1,14 @@
 ---
 py2:
     description: Python 2 compatibility check
     include: ['.']
     exclude:
         - accessible/xpcom/AccEventGen.py
-        - addon-sdk
         - browser
         - build
         - client.py
         - config
         - configure.py
         - devtools/shared/css/generated/mach_commands.py
         - dom
         - editor
--- a/tools/lint/py3.yml
+++ b/tools/lint/py3.yml
@@ -1,14 +1,13 @@
 ---
 py3:
     description: Python 3 compatibility check
     include: ['.']
     exclude:
-        - addon-sdk/source
         - browser/app
         - browser/components
         - browser/extensions
         - build
         - client.py
         - config
         - dom/bindings
         - dom/canvas/test