Backed out changeset 3ac2e09d98cb (bug 1308688) for eslint failures
authorPhil Ringnalda <philringnalda@gmail.com>
Fri, 10 Feb 2017 21:21:36 -0800
changeset 342329 e2c43c2604abb224572171d23da3215d040dcbaa
parent 342328 537d3ea987f3dbbfa56fc73208b32f515afe32ac
child 342330 e2f6d5054e20b8f54620d05aced195bb3a3192d0
push id86834
push userphilringnalda@gmail.com
push dateSat, 11 Feb 2017 05:22:48 +0000
treeherdermozilla-inbound@e2c43c2604ab [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1308688
milestone54.0a1
backs out3ac2e09d98cb55fb9440b0cb9267ed365293aa9a
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 3ac2e09d98cb (bug 1308688) for eslint failures CLOSED TREE
toolkit/components/extensions/test/mochitest/file_WebRequest_permission_original.html
toolkit/components/extensions/test/mochitest/file_WebRequest_permission_original.js
toolkit/components/extensions/test/mochitest/file_WebRequest_permission_redirected.html
toolkit/components/extensions/test/mochitest/file_WebRequest_permission_redirected.js
toolkit/components/extensions/test/mochitest/mochitest-common.ini
toolkit/components/extensions/test/mochitest/test_ext_webrequest_permission.html
deleted file mode 100644
--- a/toolkit/components/extensions/test/mochitest/file_WebRequest_permission_original.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!DOCTYPE HTML>
-
-<html>
-<head>
-<meta charset="utf-8">
-</head>
-<body>
-
-<script src="http://mochi.test:8888/tests/toolkit/components/extensions/test/mochitest/file_WebRequest_permission_original.js"></script>
-<script>
-"use strict";
-
-window.parent.postMessage({
-  page: "original",
-  script: window.testScript,
-}, "*");
-</script>
-</body>
-</html>
-
deleted file mode 100644
--- a/toolkit/components/extensions/test/mochitest/file_WebRequest_permission_original.js
+++ /dev/null
@@ -1,1 +0,0 @@
-window.testScript = "original";
deleted file mode 100644
--- a/toolkit/components/extensions/test/mochitest/file_WebRequest_permission_redirected.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!DOCTYPE HTML>
-
-<html>
-<head>
-<meta charset="utf-8">
-</head>
-<body>
-
-<script src="http://mochi.test:8888/tests/toolkit/components/extensions/test/mochitest/file_WebRequest_permission_original.js"></script>
-<script>
-"use strict";
-
-window.parent.postMessage({
-  page: "redirected",
-  script: window.testScript,
-}, "*");
-</script>
-</body>
-</html>
-
deleted file mode 100644
--- a/toolkit/components/extensions/test/mochitest/file_WebRequest_permission_redirected.js
+++ /dev/null
@@ -1,1 +0,0 @@
-window.testScript = "redirected";
--- a/toolkit/components/extensions/test/mochitest/mochitest-common.ini
+++ b/toolkit/components/extensions/test/mochitest/mochitest-common.ini
@@ -3,20 +3,16 @@ support-files =
   chrome_cleanup_script.js
   head.js
   file_mixed.html
   head_webrequest.js
   file_csp.html
   file_csp.html^headers^
   file_to_drawWindow.html
   file_WebRequest_page3.html
-  file_WebRequest_permission_original.html
-  file_WebRequest_permission_redirected.html
-  file_WebRequest_permission_original.js
-  file_WebRequest_permission_redirected.js
   file_webNavigation_clientRedirect.html
   file_webNavigation_clientRedirect_httpHeaders.html
   file_webNavigation_clientRedirect_httpHeaders.html^headers^
   file_webNavigation_frameClientRedirect.html
   file_webNavigation_frameRedirect.html
   file_webNavigation_manualSubframe.html
   file_webNavigation_manualSubframe_page1.html
   file_webNavigation_manualSubframe_page2.html
@@ -105,16 +101,15 @@ subsuite = webrequest
 subsuite = webrequest
 [test_ext_webrequest_filter.html]
 subsuite = webrequest
 [test_ext_webrequest_suspend.html]
 subsuite = webrequest
 [test_ext_webrequest_upload.html]
 skip-if = os == 'android' # Currently fails in emulator tests
 subsuite = webrequest
-[test_ext_webrequest_permission.html]
 [test_ext_webnavigation.html]
 subsuite = webnavigation
 [test_ext_webnavigation_filters.html]
 subsuite = webnavigation
 [test_ext_window_postMessage.html]
 [test_ext_subframes_privileges.html]
 [test_ext_xhr_capabilities.html]
deleted file mode 100644
--- a/toolkit/components/extensions/test/mochitest/test_ext_webrequest_permission.html
+++ /dev/null
@@ -1,73 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-  <title>Test for content script</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";
-
-add_task(function* test_permissions() {
-  function background() {
-    browser.webRequest.onBeforeRequest.addListener(details => {
-      if (details.url.includes("_original")) {
-        let redirectUrl = details.url
-                                 .replace("mochi.test:8888", "example.com")
-                                 .replace("_original", "_redirected");
-        return {redirectUrl};
-      }
-      return {};
-    }, {urls: ["<all_urls>"]}, ["blocking"]);
-  }
-
-  let extensionData = {
-    manifest: {
-      permissions: ["webRequest", "webRequestBlocking", "<all_urls>"],
-    },
-    background,
-  };
-
-  let extension = ExtensionTestUtils.loadExtension(extensionData);
-  yield extension.startup();
-
-  function* check() {
-    let iframe = document.createElement("iframe");
-    document.body.appendChild(iframe);
-
-    let promise = new Promise(resolve => {
-      let listener = event => {
-        window.removeEventListener("message", listener);
-        resolve(event.data);
-      };
-      window.addEventListener("message", listener);
-    });
-
-    iframe.setAttribute("src", "http://example.com/tests/toolkit/components/extensions/test/mochitest/file_WebRequest_permission_original.html");
-    let result = yield promise;
-    document.body.removeChild(iframe);
-    return result;
-  }
-
-  let results = yield check();
-  is(results.page, "redirected", "Regular webRequest redirect works on an unprivileged page");
-  is(results.script, "redirected", "Regular webRequest redirect works from an unprivileged page");
-
-  yield SpecialPowers.pushPrefEnv({
-    set: [["extensions.webapi.testing", true]],
-  });
-
-  results = yield check();
-  is(results.page, "original", "webRequest redirect fails on a privileged page");
-  is(results.script, "original", "webRequest redirect fails from a privileged page");
-
-  yield extension.unload();
-});
-</script>
-
-</body>
-</html>