Bug 1009334 - Ship the Add-on SDK bootstrap.js file with Firefox r=Mossop
authorErik Vold <evold@mozilla.com>
Tue, 20 May 2014 13:22:41 -0700
changeset 184006 9c32f0d1967d20779836482df1ebfdafc101b039
parent 184005 e92a5e5c061412d6d584a41c1e70b664e59bdf21
child 184007 bfcd487240a07c890ba67379e7a5e8d6e51a3f3c
push id6878
push userevold@mozilla.com
push dateTue, 20 May 2014 20:26:30 +0000
treeherderfx-team@9c32f0d1967d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMossop
bugs1009334
milestone32.0a1
Bug 1009334 - Ship the Add-on SDK bootstrap.js file with Firefox r=Mossop
addon-sdk/moz.build
addon-sdk/source/test/test-bootstrap.js
--- a/addon-sdk/moz.build
+++ b/addon-sdk/moz.build
@@ -1,7 +1,13 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # 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/.
 
 BROWSER_CHROME_MANIFESTS += ['test/browser.ini']
+
+JS_MODULES_PATH = 'modules/sdk'
+
+EXTRA_JS_MODULES += [
+    'source/app-extension/bootstrap.js',
+]
new file mode 100644
--- /dev/null
+++ b/addon-sdk/source/test/test-bootstrap.js
@@ -0,0 +1,19 @@
+/* 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/. */
+"use strict";
+
+const { Request } = require("sdk/request");
+
+exports.testBootstrapExists = function (assert, done) {
+  Request({
+    url: "resource://gre/modules/sdk/bootstrap.js",
+    onComplete: function (response) {
+      if (response.text)
+        assert.pass("the bootstrap file was found");
+      done();
+    }
+  }).get();
+};
+
+require("sdk/test").run(exports);