Backed out changeset 8f9b35334718 (bug 1288885)
authorSebastian Hengst <archaeopteryx@coole-files.de>
Thu, 28 Jul 2016 10:06:34 +0200
changeset 347048 818d8bec0053ed3b3940dda5d713574cbc5a983d
parent 347047 ed8bccdad264d14be530518f2c14896e8626ff7d
child 347049 ca71e5fc9233252c1af5dfb924eb65e1b10b7674
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1288885
milestone50.0a1
backs out8f9b353347181aba8d2c5bbb8357251031367b27
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
Backed out changeset 8f9b35334718 (bug 1288885)
toolkit/components/extensions/test/mochitest/mochitest.ini
toolkit/components/extensions/test/mochitest/test_ext_localStorage.html
toolkit/components/extensions/test/xpcshell/test_ext_localStorage.js
toolkit/components/extensions/test/xpcshell/xpcshell.ini
--- a/toolkit/components/extensions/test/mochitest/mochitest.ini
+++ b/toolkit/components/extensions/test/mochitest/mochitest.ini
@@ -47,16 +47,17 @@ skip-if = buildapp == 'b2g' # runat != d
 [test_ext_contentscript_create_iframe.html]
 [test_ext_contentscript_devtools_metadata.html]
 [test_ext_contentscript_exporthelpers.html]
 [test_ext_contentscript_css.html]
 [test_ext_downloads.html]
 [test_ext_exclude_include_globs.html]
 [test_ext_i18n_css.html]
 [test_ext_generate.html]
+[test_ext_localStorage.html]
 [test_ext_notifications.html]
 [test_ext_permission_xhr.html]
 skip-if = buildapp == 'b2g' # JavaScript error: jar:remoteopenfile:///data/local/tmp/generated-extension.xpi!/content.js, line 46: NS_ERROR_ILLEGAL_VALUE:
 [test_ext_runtime_connect.html]
 skip-if = (os == 'android' || buildapp == 'b2g') # port.sender.tab is undefined on b2g. Bug 1258975 on android.
 [test_ext_runtime_connect_twoway.html]
 [test_ext_runtime_connect2.html]
 skip-if = (os == 'android' || buildapp == 'b2g') # port.sender.tab is undefined on b2g. Bug 1258975 on android.
rename from toolkit/components/extensions/test/xpcshell/test_ext_localStorage.js
rename to toolkit/components/extensions/test/mochitest/test_ext_localStorage.html
--- a/toolkit/components/extensions/test/xpcshell/test_ext_localStorage.js
+++ b/toolkit/components/extensions/test/mochitest/test_ext_localStorage.html
@@ -1,10 +1,21 @@
-/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set sts=2 sw=2 et tw=80: */
+<!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">
 "use strict";
 
 function backgroundScript() {
   let hasRun = localStorage.getItem("has-run");
   let result;
   if (!hasRun) {
     localStorage.setItem("has-run", "yup");
     localStorage.setItem("test-item", "item1");
@@ -22,28 +33,28 @@ function backgroundScript() {
       result = "cleared";
     }
   }
   browser.test.sendMessage("result", result);
   browser.test.notifyPass("localStorage");
 }
 
 let extensionData = {
-  background: backgroundScript,
+  background: "(" + backgroundScript.toString() + ")()",
 };
 
-add_task(function* test_localStorage() {
+add_task(function* test_contentscript() {
   let id = "test-webextension@mozilla.com";
   const RESULTS = ["item1", "item2", "deleted", "cleared", "item1"];
 
   for (let expected of RESULTS) {
     let extension = ExtensionTestUtils.loadExtension(extensionData, id);
-
-    yield extension.startup();
-
-    let actual = yield extension.awaitMessage("result");
-
+    let [, actual] = yield Promise.all([extension.startup(), extension.awaitMessage("result")]);
     yield extension.awaitFinish("localStorage");
     yield extension.unload();
 
-    equal(actual, expected, "got expected localStorage data");
+    is(actual, expected, "got expected localStorage data");
   }
 });
+</script>
+
+</body>
+</html>
--- a/toolkit/components/extensions/test/xpcshell/xpcshell.ini
+++ b/toolkit/components/extensions/test/xpcshell/xpcshell.ini
@@ -7,17 +7,16 @@ skip-if = toolkit == 'gonk' || appname =
 [test_csp_custom_policies.js]
 [test_csp_validator.js]
 [test_ext_alarms.js]
 [test_ext_background_runtime_connect_params.js]
 [test_ext_contexts.js]
 [test_ext_extension.js]
 [test_ext_idle.js]
 [test_ext_json_parser.js]
-[test_ext_localStorage.js]
 [test_ext_manifest_content_security_policy.js]
 [test_ext_manifest_incognito.js]
 [test_ext_onmessage_removelistener.js]
 [test_ext_runtime_connect_no_receiver.js]
 [test_ext_runtime_getPlatformInfo.js]
 [test_ext_runtime_sendMessage.js]
 [test_ext_runtime_sendMessage_no_receiver.js]
 [test_ext_schemas.js]