Bug 1288885: Migrate alarms tests to xpcshell. r?aswan
MozReview-Commit-ID: 6NPOqsAfWSb
--- a/toolkit/components/extensions/test/mochitest/mochitest.ini
+++ b/toolkit/components/extensions/test/mochitest/mochitest.ini
@@ -79,17 +79,16 @@ skip-if = (os == 'android' || buildapp =
[test_ext_storage.html]
[test_ext_storage_content.html]
[test_ext_storage_tab.html]
skip-if = os == 'android' # Android does not currently support tabs.
[test_ext_background_runtime_connect_params.html]
[test_ext_cookies.html]
[test_ext_bookmarks.html]
skip-if = (os == 'android' || buildapp == 'b2g') # unimplemented api. Bug 1258975 on android.
-[test_ext_alarms.html]
[test_ext_background_window_properties.html]
[test_ext_background_sub_windows.html]
[test_ext_background_api_injection.html]
[test_ext_background_generated_url.html]
[test_ext_background_generated_reload.html]
[test_ext_background_generated_load_events.html]
[test_ext_i18n.html]
skip-if = (os == 'android') # Bug 1258975 on android.
rename from toolkit/components/extensions/test/mochitest/test_ext_alarms.html
rename to toolkit/components/extensions/test/xpcshell/test_ext_alarms.js
--- a/toolkit/components/extensions/test/mochitest/test_ext_alarms.html
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_alarms.js
@@ -1,21 +1,10 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <title>WebExtension test</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SpawnTask.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/ExtensionTestUtils.js"></script>
- <script type="text/javascript" src="head.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-</head>
-<body>
-
-<script type="text/javascript">
+/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* vim: set sts=2 sw=2 et tw=80: */
"use strict";
add_task(function* test_alarm_without_permissions() {
function backgroundScript() {
browser.test.assertTrue(!browser.alarms,
"alarm API is not available when the alarm permission is not required");
browser.test.notifyPass("alarms_permission");
}
@@ -338,13 +327,8 @@ add_task(function* test_duplicate_alarm_
permissions: ["alarms"],
},
});
yield extension.startup();
yield extension.awaitFinish("alarm-duplicate");
yield extension.unload();
});
-
-</script>
-
-</body>
-</html>
--- a/toolkit/components/extensions/test/xpcshell/xpcshell.ini
+++ b/toolkit/components/extensions/test/xpcshell/xpcshell.ini
@@ -1,14 +1,15 @@
[DEFAULT]
head = head.js
tail =
firefox-appdir = browser
skip-if = toolkit == 'gonk' || appname == "thunderbird"
+[test_ext_alarms.js]
[test_csp_custom_policies.js]
[test_csp_validator.js]
[test_locale_data.js]
[test_locale_converter.js]
[test_ext_contexts.js]
[test_ext_json_parser.js]
[test_ext_manifest_content_security_policy.js]
[test_ext_manifest_incognito.js]