Backed out changeset 08c70292a9a8 (bug 1226423) to fix intermittent failure
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Wed, 25 Nov 2015 09:53:49 +0100
changeset 305640 f8573ae21af852e2ac2eb069f5bc4bb586966955
parent 305639 c7a2630ceab040360f53372e9413a99ea8159d16
child 305641 d3d3c9f2ea37843d4e1f8f35789aea5ca9ef1d83
push id1001
push userraliiev@mozilla.com
push dateMon, 18 Jan 2016 19:06:03 +0000
treeherdermozilla-release@8b89261f3ac4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1226423
milestone44.0a2
backs out08c70292a9a80666d51572676e1175100468d318
Backed out changeset 08c70292a9a8 (bug 1226423) to fix intermittent failure
toolkit/components/extensions/test/mochitest/file_ext_background_api_injection.js
toolkit/components/extensions/test/mochitest/file_privilege_escalation.html
toolkit/components/extensions/test/mochitest/mochitest.ini
toolkit/components/extensions/test/mochitest/test_ext_background_api_injection.html
deleted file mode 100644
--- a/toolkit/components/extensions/test/mochitest/file_ext_background_api_injection.js
+++ /dev/null
@@ -1,12 +0,0 @@
-"use strict";
-
-var { interfaces: Ci } = Components;
-
-Components.utils.import("resource://gre/modules/Services.jsm");
-
-Services.console.registerListener(function listener(message) {
-  if (/WebExt Privilege Escalation/.test(message.message)) {
-    Services.console.unregisterListener(listener);
-    sendAsyncMessage("console-message", { message: message.message });
-  }
-});
deleted file mode 100644
--- a/toolkit/components/extensions/test/mochitest/file_privilege_escalation.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<!DOCTYPE HTML>
-
-<html>
-<head>
-<meta charset="utf-8">
-</head>
-<body>
-  <script type="application/javascript">
-    throw new Error(`WebExt Privilege Escalation: typeof(browser) = ${typeof(browser)}`);
-  </script>
-</body>
-</html>
--- a/toolkit/components/extensions/test/mochitest/mochitest.ini
+++ b/toolkit/components/extensions/test/mochitest/mochitest.ini
@@ -10,18 +10,16 @@ support-files =
   file_style_good.css
   file_style_bad.css
   file_style_redirect.css
   file_script_good.js
   file_script_bad.js
   file_script_redirect.js
   file_script_xhr.js
   file_sample.html
-  file_privilege_escalation.html
-  file_ext_background_api_injection.js
 
 [test_ext_simple.html]
 [test_ext_geturl.html]
 [test_ext_contentscript.html]
 [test_ext_webrequest.html]
 [test_ext_generate.html]
 [test_ext_notifications.html]
 [test_ext_runtime_connect.html]
@@ -29,14 +27,8 @@ support-files =
 [test_ext_sandbox_var.html]
 [test_ext_sendmessage_reply.html]
 [test_ext_sendmessage_doublereply.html]
 [test_ext_storage.html]
 [test_ext_background_runtime_connect_params.html]
 [test_ext_cookies.html]
 [test_ext_bookmarks.html]
 [test_ext_alarms.html]
-[test_ext_background_window_properties.html]
-[test_ext_background_sub_windows.html]
-[test_ext_background_api_injection.html]
-[test_ext_jsversion.html]
-skip-if = e10s # Uses a console monitor which doesn't work from a content process. The code being tested doesn't run in a tab content process in any case.
-[test_ext_i18n.html]
deleted file mode 100644
--- a/toolkit/components/extensions/test/mochitest/test_ext_background_api_injection.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-  <title>Test for privilege escalation into content pages</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="application/javascript;version=1.8">
-"use strict";
-
-add_task(function* testBackgroundWindow() {
-  let extension = ExtensionTestUtils.loadExtension({
-    background: "new " + function() {
-      const BASE = "http://mochi.test:8888/tests/toolkit/components/extensions/test/mochitest";
-
-      browser.test.log("background script executed");
-      window.location = `${BASE}/file_privilege_escalation.html`;
-    },
-  });
-
-  let awaitConsole = new Promise(resolve => {
-    let chromeScript = SpecialPowers.loadChromeScript(
-      SimpleTest.getTestFileURL("file_ext_background_api_injection.js"));
-
-    chromeScript.addMessageListener("console-message", resolve);
-  });
-
-  yield extension.startup();
-
-  let message = yield awaitConsole;
-
-  ok(message.message.includes("WebExt Privilege Escalation: typeof(browser) = undefined"),
-     "Document does not have `browser` APIs.");
-
-  yield extension.unload();
-});
-
-</script>
-
-</body>
-</html>