diff options
Diffstat (limited to 'toolkit/mozapps/extensions/test')
4 files changed, 47 insertions, 0 deletions
diff --git a/toolkit/mozapps/extensions/test/addons/test_bootstrap_const/bootstrap.js b/toolkit/mozapps/extensions/test/addons/test_bootstrap_const/bootstrap.js new file mode 100644 index 000000000..498b76526 --- /dev/null +++ b/toolkit/mozapps/extensions/test/addons/test_bootstrap_const/bootstrap.js @@ -0,0 +1,5 @@ +Components.utils.import("resource://gre/modules/Services.jsm");
+
+const install = function() {
+ Services.obs.notifyObservers(null, "addon-install", "");
+}
\ No newline at end of file diff --git a/toolkit/mozapps/extensions/test/addons/test_bootstrap_const/install.rdf b/toolkit/mozapps/extensions/test/addons/test_bootstrap_const/install.rdf new file mode 100644 index 000000000..af3a749ce --- /dev/null +++ b/toolkit/mozapps/extensions/test/addons/test_bootstrap_const/install.rdf @@ -0,0 +1,24 @@ +<?xml version="1.0"?>
+
+<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:em="http://www.mozilla.org/2004/em-rdf#">
+
+ <Description about="urn:mozilla:install-manifest">
+ <em:id>bootstrap@tests.mozilla.org</em:id>
+ <em:version>1.0</em:version>
+ <em:bootstrap>true</em:bootstrap>
+
+ <!-- Front End MetaData -->
+ <em:name>Test Bootstrap</em:name>
+ <em:description>Test Description</em:description>
+
+ <em:targetApplication>
+ <Description>
+ <em:id>xpcshell@tests.mozilla.org</em:id>
+ <em:minVersion>1</em:minVersion>
+ <em:maxVersion>1</em:maxVersion>
+ </Description>
+ </em:targetApplication>
+
+ </Description>
+</RDF>
\ No newline at end of file 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 diff --git a/toolkit/mozapps/extensions/test/xpcshell/xpcshell-shared.ini b/toolkit/mozapps/extensions/test/xpcshell/xpcshell-shared.ini index bab072e83..2a12f147a 100644 --- a/toolkit/mozapps/extensions/test/xpcshell/xpcshell-shared.ini +++ b/toolkit/mozapps/extensions/test/xpcshell/xpcshell-shared.ini @@ -29,6 +29,7 @@ skip-if = os == "android" [test_bootstrap.js] # Bug 676992: test consistently hangs on Android skip-if = os == "android" +[test_bootstrap_const.js] [test_bootstrap_resource.js] [test_bug299716.js] # Bug 676992: test consistently hangs on Android |