summaryrefslogtreecommitdiffstats
path: root/toolkit/mozapps/extensions/test/xpcshell/test_bootstrap_const.js
diff options
context:
space:
mode:
authorJustOff <Off.Just.Off@gmail.com>2018-04-23 14:52:50 +0300
committerJustOff <Off.Just.Off@gmail.com>2018-04-23 14:52:50 +0300
commitbe2b3635ad7f21582a5cfd5a25fc4ec41653c1c7 (patch)
tree2efcee5cff17dc0dd8cf9237ddaede584c7b22b1 /toolkit/mozapps/extensions/test/xpcshell/test_bootstrap_const.js
parentbccb9c1708f007ada1ea8c4879db88a587f0a450 (diff)
downloadUXP-be2b3635ad7f21582a5cfd5a25fc4ec41653c1c7.tar
UXP-be2b3635ad7f21582a5cfd5a25fc4ec41653c1c7.tar.gz
UXP-be2b3635ad7f21582a5cfd5a25fc4ec41653c1c7.tar.lz
UXP-be2b3635ad7f21582a5cfd5a25fc4ec41653c1c7.tar.xz
UXP-be2b3635ad7f21582a5cfd5a25fc4ec41653c1c7.zip
Fix accessing the bootstrap methods when they are declared in the new lexical scope
Diffstat (limited to 'toolkit/mozapps/extensions/test/xpcshell/test_bootstrap_const.js')
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/test_bootstrap_const.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/toolkit/mozapps/extensions/test/xpcshell/test_bootstrap_const.js b/toolkit/mozapps/extensions/test/xpcshell/test_bootstrap_const.js
new file mode 100644
index 000000000..fb02b59be
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bootstrap_const.js
@@ -0,0 +1,17 @@
+/* Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/publicdomain/zero/1.0/
+ */
+
+createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "1");
+startupManager();
+
+add_task(function*() {
+ let sawInstall = false;
+ Services.obs.addObserver(function() {
+ sawInstall = true;
+ }, "addon-install", false);
+
+ yield promiseInstallAllFiles([do_get_addon("test_bootstrap_const")]);
+
+ ok(sawInstall);
+}); \ No newline at end of file