Bug 1276462 - Backout c18023d517ed (Bug 219157) a=backout
authorValentin Gosu <valentin.gosu@gmail.com>
Mon, 30 May 2016 16:05:14 +0200
changeset 340596 8cb9e54529f5cb4c2d02a9f6a2ea3e52c653db65
parent 340595 f4f4784cd3956917b0bf40e1bf0548af2893199f
child 340597 0d474d88654af4d734f25c3e655989133155917f
push id1183
push userraliiev@mozilla.com
push dateMon, 05 Sep 2016 20:01:49 +0000
treeherdermozilla-release@3148731bed45 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1276462, 219157
milestone49.0a1
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
Bug 1276462 - Backout c18023d517ed (Bug 219157) a=backout
netwerk/test/mochitests/file_cookie_access.html
netwerk/test/mochitests/mochitest.ini
netwerk/test/mochitests/test_cookie_access.html
deleted file mode 100644
--- a/netwerk/test/mochitests/file_cookie_access.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!--
-  Any copyright is dedicated to the Public Domain.
-  http://creativecommons.org/publicdomain/zero/1.0/
--->
-
-<!DOCTYPE HTML>
-<html>
-<head>
-  <meta charset="UTF-8">
-</head>
-<body>
-
-<pre id="test">
-<script type="application/javascript">
-  var old_cookie = document.cookie;
-  document.cookie = location.search.substring(1);
-  var new_cookie = document.cookie;
-  // Post back the previous cookie, and the newly set cookie.
-  window.opener.postMessage(old_cookie+"-"+new_cookie, "http://mochi.test:8888");
-</script>
-</pre>
-
-</body>
-</html>
--- a/netwerk/test/mochitests/mochitest.ini
+++ b/netwerk/test/mochitests/mochitest.ini
@@ -9,26 +9,24 @@ support-files =
   user_agent_update.sjs
   web_packaged_app.sjs
   file_loadinfo_redirectchain.sjs
   redirect_idn.html^headers^
   redirect_idn.html
   empty.html
   redirect.sjs
   !/dom/apps/tests/file_app.sjs
-  file_cookie_access.html
 
 [test_arraybufferinputstream.html]
 [test_partially_cached_content.html]
 [test_rel_preconnect.html]
 [test_uri_scheme.html]
 [test_user_agent_overrides.html]
 [test_user_agent_updates.html]
 [test_user_agent_updates_reset.html]
 [test_viewsource_unlinkable.html]
 [test_xhr_method_case.html]
 [test_web_packaged_app.html]
 skip-if = buildapp != 'mulet'
 [test_loadinfo_redirectchain.html]
 skip-if = buildapp == 'b2g' #no ssl support
 [test_idn_redirect.html]
 [test_redirect_ref.html]
-[test_cookie_access.html]
deleted file mode 100644
--- a/netwerk/test/mochitests/test_cookie_access.html
+++ /dev/null
@@ -1,96 +0,0 @@
-<!--
-  Any copyright is dedicated to the Public Domain.
-  http://creativecommons.org/publicdomain/zero/1.0/
--->
-
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=219157
--->
-<head>
-  <meta charset="UTF-8">
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-</head>
-<body>
-
-<pre id="test">
-<script type="application/javascript">
-
-SimpleTest.waitForExplicitFinish();
-var URI = "http://sub1.test1.example.com/tests/netwerk/test/mochitests/file_cookie_access.html";
-
-const chromeScript = SpecialPowers.loadChromeScript(_ => {
-  Components.utils.import("resource://gre/modules/Services.jsm");
-  var URI = "http://sub1.test1.example.com/tests/netwerk/test/mochitests/file_cookie_access.html";
-  var cp = Components.classes["@mozilla.org/cookie/permission;1"]
-                     .getService(Components.interfaces.nsICookiePermission);
-  var uriObj = Services.io.newURI(URI, null, null);
-
-  addMessageListener("setAccess", function(allow) { cp.setAccess(uriObj, allow ? cp.ACCESS_ALLOW : cp.ACCESS_DENY); });
-});
-
-var set_cookie = [undefined,     // step 0: there is no step 0
-                  "",            // step 1: set the cookie to ""
-                  "?c00k1e_2",   // step 2: will never be set. Even steps don' have access.
-                  "?c00k1e_3" ,  // step 3: set the cookie to this
-                  "?c00k1e_4" ,  // step 4: will never be set. Even steps don' have access.
-                  "?c00k1e_5" ,  // step 5: set the cookie to this
-                  "?c00k1e_6" ,  // step 6: will never be set. Even steps don' have access.
-                  "",            // step 7: set the cookie to "" - as a cleanup.
-                  ""];           // step 8: will never be set. Even steps don' have access.
-var step = 1;
-function start() {
-  chromeScript.sendSyncMessage("setAccess", step % 2 == 1);
-  var url = URI+set_cookie[step];
-  subwindow = window.open(url);
-}
-
-window.addEventListener("message", receiveMessage, false);
-
-start();
-
-function receiveMessage(event) {
-    switch (step) {
-      // Before: cookie="_WHAT_EVER_". After: cookie="". CAN SET COOKIE
-      case 1: is(event.data.substring(event.data.indexOf('-')),
-                 /* any coookie + */"-", "Step "+step+" - Got expected cookie"); break;
-
-      // Before: cookie="". After: cookie="c00k1e_2". CAN'T SET COOKIE
-      case 2: is(event.data, "-", "Step "+step+" - Got expected cookie"); break;
-
-      // Before: cookie="". After: cookie="c00k1e_3". CAN SET COOKIE
-      case 3: is(event.data, "-c00k1e_3", "Step "+step+" - Got expected cookie"); break;
-
-      // Before: cookie="c00k1e_3". After: cookie="c00k1e_3". CAN'T SET COOKIE
-      case 4: is(event.data, "c00k1e_3-c00k1e_3", "Step "+step+" - Got expected cookie"); break;
-
-      // Before: cookie="c00k1e_3". After: cookie="c00k1e_5". CAN SET COOKIE
-      case 5: is(event.data, "c00k1e_3-c00k1e_5", "Step "+step+" - Got expected cookie"); break;
-
-      // Before: cookie="c00k1e_5". After: cookie="c00k1e_5". CAN'T SET COOKIE
-      case 6: is(event.data, "c00k1e_5-c00k1e_5", "Step "+step+" - Got expected cookie"); break;
-
-      // Before: cookie="c00k1e_5". After: cookie="". CAN SET COOKIE
-      case 7: is(event.data, "c00k1e_5-", "Step "+step+" - Got expected cookie"); break;
-
-      // Before: cookie="". After: cookie="". CAN'T SET COOKIE
-      case 8: is(event.data, "-", "Step "+step+" - Got expected cookie"); break;
-
-      default: ok(false, "should not reach this step");
-    }
-    subwindow.close();
-    step++;
-    if (step == 9) {
-      SimpleTest.finish();
-      return;
-    }
-    start();
-}
-
-</script>
-</pre>
-
-</body>
-</html>