Backed out changeset a844765fb5d9 (bug 806127)
authorJustin Lebar <justin.lebar@gmail.com>
Tue, 30 Oct 2012 21:35:46 -0400
changeset 111979 df6cbf360b2506a2d7f11d5e0350e1948a3c5788
parent 111978 2633b018c0a052acab4cb25f8f5c385162990627
child 111980 1e04d8f5e601baded077ef0ae967c691b1836d65
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
bugs806127
milestone19.0a1
backs outa844765fb5d9ea82f44d90690a71bb6cb05e556d
Backed out changeset a844765fb5d9 (bug 806127)
dom/browser-element/mochitest/Makefile.in
dom/browser-element/mochitest/browserElement_CookiesNotThirdParty.js
dom/browser-element/mochitest/file_browserElement_CookiesNotThirdParty.html
dom/browser-element/mochitest/test_browserElement_inproc_CookiesNotThirdParty.html
dom/browser-element/mochitest/test_browserElement_oop_CookiesNotThirdParty.html
--- a/dom/browser-element/mochitest/Makefile.in
+++ b/dom/browser-element/mochitest/Makefile.in
@@ -85,19 +85,16 @@ MOCHITEST_FILES = \
 		file_browserElement_ForwardName.html \
 		browserElement_TargetBlank.js \
 		test_browserElement_inproc_TargetBlank.html \
 		file_browserElement_TargetBlank.html \
 		browserElement_PromptCheck.js \
 		test_browserElement_inproc_PromptCheck.html \
 		browserElement_PromptConfirm.js \
 		test_browserElement_inproc_PromptConfirm.html \
-		browserElement_CookiesNotThirdParty.js \
-		file_browserElement_CookiesNotThirdParty.html \
-		test_browserElement_inproc_CookiesNotThirdParty.html \
 		browserElement_Close.js \
 		test_browserElement_inproc_Close.html \
 		browserElement_CloseFromOpener.js \
 		test_browserElement_inproc_CloseFromOpener.html \
 		file_browserElement_CloseFromOpener.html \
 		browserElement_CloseApp.js \
 		test_browserElement_inproc_CloseApp.html \
 		file_browserElement_CloseApp.html \
@@ -192,17 +189,16 @@ MOCHITEST_FILES += \
 		test_browserElement_oop_FirstPaint.html \
 		test_browserElement_oop_Alert.html \
 		test_browserElement_oop_AlertInFrame.html \
 		test_browserElement_oop_TargetTop.html \
 		test_browserElement_oop_ForwardName.html \
 		test_browserElement_oop_TargetBlank.html \
 		test_browserElement_oop_PromptCheck.html \
 		test_browserElement_oop_PromptConfirm.html \
-		test_browserElement_oop_CookiesNotThirdParty.html \
 		test_browserElement_oop_Close.html \
 		test_browserElement_oop_CloseFromOpener.html \
 		test_browserElement_oop_CloseApp.html \
 		test_browserElement_oop_OpenWindow.html \
 		test_browserElement_oop_OpenWindowInFrame.html \
 		test_browserElement_oop_OpenWindowRejected.html \
 		test_browserElement_oop_OpenWindowDifferentOrigin.html \
 		test_browserElement_oop_OpenNamed.html \
deleted file mode 100644
--- a/dom/browser-element/mochitest/browserElement_CookiesNotThirdParty.js
+++ /dev/null
@@ -1,50 +0,0 @@
-/* Any copyright is dedicated to the public domain.
-   http://creativecommons.org/publicdomain/zero/1.0/ */
-
-// Bug 806127 - Test that cookies set by <iframe mozbrowser> are not considered
-// third-party.
-"use strict";
-
-SimpleTest.waitForExplicitFinish();
-
-function runTest() {
-  browserElementTestHelpers.setEnabledPref(true);
-  browserElementTestHelpers.addPermission();
-
-  const innerPage = 'http://example.com/tests/dom/browser-element/mochitest/file_browserElement_CookiesNotThirdParty.html';
-
-  var iframe = document.createElement('iframe');
-  iframe.mozbrowser = true;
-
-  iframe.addEventListener('mozbrowsershowmodalprompt', function(e) {
-    if (e.detail.message == 'next') {
-      iframe.src = innerPage + '?step=2';
-      return;
-    }
-
-    if (e.detail.message.startsWith('success:')) {
-      ok(true, e.detail.message);
-      return;
-    }
-
-    if (e.detail.message.startsWith('failure:')) {
-      ok(false, e.detail.message);
-      return;
-    }
-
-    if (e.detail.message == 'finish') {
-      SimpleTest.finish();
-    }
-  });
-
-  // innerPage will set a cookie and then alert('next').  We'll load
-  // innerPage?step=2.  That page will check that the cooke exists (despite the
-  // fact that we've disabled third-party cookies) and alert('success:') or
-  // alert('failure:'), as appropriate.  Finally, the page will
-  // alert('finish');
-  iframe.src = innerPage;
-  document.body.appendChild(iframe);
-}
-
-// Disable third-party cookies for this test.
-SpecialPowers.pushPrefEnv({'set': [['network.cookie.cookieBehavior', 1]]}, runTest);
deleted file mode 100644
--- a/dom/browser-element/mochitest/file_browserElement_CookiesNotThirdParty.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<html>
-<body>
-file_browserElement_CookiesNotThirdParty.html
-
-<script type='text/javascript;version=1.7'>
-if (location.search != '?step=2') {
-  // Step 1: Set a cookie.
-  document.cookie = 'file_browserElement_CookiesNotThirdParty';
-  alert('next');
-}
-else {
-  // Step 2: Read the cookie.
-  if (document.cookie == 'file_browserElement_CookiesNotThirdParty') {
-    alert('success: got the correct cookie');
-  }
-  else {
-    alert('failure: got unexpected cookie: "' + document.cookie + '"');
-  }
-
-  alert('finish');
-}
-</script>
-
-</body>
-</html>
deleted file mode 100644
--- a/dom/browser-element/mochitest/test_browserElement_inproc_CookiesNotThirdParty.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-  <title>Test for Bug 806127</title>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <script type="application/javascript" src="browserElementTestHelpers.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-</head>
-<body>
-<script type="application/javascript;version=1.7" src="browserElement_CookiesNotThirdParty.js">
-</script>
-</body>
-</html>
\ No newline at end of file
deleted file mode 100644
--- a/dom/browser-element/mochitest/test_browserElement_oop_CookiesNotThirdParty.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-  <title>Test for Bug 806127</title>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <script type="application/javascript" src="browserElementTestHelpers.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-</head>
-<body>
-<script type="application/javascript;version=1.7" src="browserElement_CookiesNotThirdParty.js">
-</script>
-</body>
-</html>
\ No newline at end of file