Backed out changeset a32b3e3c6b34 (bug 1288276)
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Fri, 05 Aug 2016 15:31:40 +0200
changeset 308404 697966241877db4589acca003f2083e523006845
parent 308403 8a57ce4bdb7fb4eef729652b4a07461d807a581b
child 308405 1e08d12783fbf1568bcf29aecd650721d217d46d
push id80334
push userkwierso@gmail.com
push dateFri, 05 Aug 2016 21:06:09 +0000
treeherdermozilla-inbound@12b31a12d10a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1288276
milestone51.0a1
backs outa32b3e3c6b34d28e5e1d4f484f0fa6ef74a458cd
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 a32b3e3c6b34 (bug 1288276)
toolkit/components/extensions/test/mochitest/mochitest.ini
toolkit/components/extensions/test/mochitest/test_ext_background_teardown.html
--- a/toolkit/components/extensions/test/mochitest/mochitest.ini
+++ b/toolkit/components/extensions/test/mochitest/mochitest.ini
@@ -71,17 +71,16 @@ skip-if = (os == 'android' || buildapp =
 [test_ext_sendmessage_doublereply.html]
 skip-if = (os == 'android' || buildapp == 'b2g') # sender.tab is undefined on b2g. Bug 1258975 on android.
 [test_ext_storage_content.html]
 [test_ext_storage_tab.html]
 skip-if = os == 'android' # Android does not currently support tabs.
 [test_ext_cookies.html]
 [test_ext_background_api_injection.html]
 [test_ext_background_generated_url.html]
-[test_ext_background_teardown.html]
 [test_ext_i18n.html]
 skip-if = (os == 'android') # Bug 1258975 on android.
 [test_ext_web_accessible_resources.html]
 skip-if = (os == 'android') # Bug 1258975 on android.
 [test_ext_webrequest.html]
 skip-if = (os == 'android' || buildapp == 'b2g') # webrequest api uninplemented (bug 1199504). Bug 1258975 on android.
 [test_ext_webnavigation.html]
 skip-if = (os == 'android' || buildapp == 'b2g') # needs TabManager which is not yet implemented. Bug 1258975 on android.
deleted file mode 100644
--- a/toolkit/components/extensions/test/mochitest/test_ext_background_teardown.html
+++ /dev/null
@@ -1,76 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-  <title>Test for background script teardown</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>
-"use strict";
-
-add_task(function* test_background_reload_and_unload() {
-  function backgroundScript() {
-    browser.test.onMessage.addListener(msg => {
-      browser.test.assertEq("reload-background", msg);
-      location.reload();
-    });
-    browser.test.sendMessage("background-url", location.href);
-  }
-
-  let chromeScript = SpecialPowers.loadChromeScript(
-      SimpleTest.getTestFileURL("file_teardown_test.js"));
-  yield chromeScript.promiseOneMessage("chromescript-startup");
-
-  let extensionData = {
-    background: `(${backgroundScript})();`,
-  };
-
-  let extension = ExtensionTestUtils.loadExtension(extensionData);
-  function* getContextEvents() {
-    chromeScript.sendAsyncMessage("get-context-events");
-    let contextEvents = yield chromeScript.promiseOneMessage("context-events");
-    return contextEvents.filter(event => event.extensionId == extension.id);
-  }
-  yield extension.startup();
-  let backgroundUrl = yield extension.awaitMessage("background-url");
-
-  let contextEvents = yield* getContextEvents();
-  is(contextEvents.length, 1,
-      "ExtensionContext state change after loading an extension");
-  is(contextEvents[0].eventType, "load");
-  is(contextEvents[0].url, backgroundUrl,
-      "The ExtensionContext should be the background page");
-
-  extension.sendMessage("reload-background");
-  yield extension.awaitMessage("background-url");
-
-  contextEvents = yield* getContextEvents();
-  is(contextEvents.length, 2,
-      "ExtensionContext state changes after reloading the background page");
-  is(contextEvents[0].eventType, "unload",
-      "Unload ExtensionContext of background page");
-  is(contextEvents[0].url, backgroundUrl, "ExtensionContext URL = background");
-  is(contextEvents[1].eventType, "load",
-      "Create new ExtensionContext for background page");
-  is(contextEvents[1].url, backgroundUrl, "ExtensionContext URL = background");
-  yield extension.unload();
-
-  contextEvents = yield* getContextEvents();
-  is(contextEvents.length, 1,
-      "ExtensionContext state change after unloading the extension");
-  is(contextEvents[0].eventType, "unload",
-      "Unload ExtensionContext for background page after extension unloads");
-  is(contextEvents[0].url, backgroundUrl, "ExtensionContext URL = background");
-
-  chromeScript.sendAsyncMessage("cleanup");
-  chromeScript.destroy();
-});
-</script>
-
-</body>
-</html>