From 63796d97248956b9c06a7889b007b34bc8b486f4 Mon Sep 17 00:00:00 2001 From: Steve Block Date: Wed, 24 Nov 2010 13:46:35 +0000 Subject: Add LayoutTests http/tests/cookies at r71558 All tests pass or have failing test expectations. Bug: 3227269 Change-Id: Ia0d58eb29d312c57c2f687e5431bb997b9433560 --- ...ouble-quoted-value-with-semi-colon-expected.txt | 11 + .../double-quoted-value-with-semi-colon.html | 13 ++ .../tests/cookies/multiple-cookies-expected.txt | 13 ++ .../http/tests/cookies/multiple-cookies.html | 13 ++ .../http/tests/cookies/resources/clearCookies.cgi | 27 +++ .../tests/cookies/resources/cookie-utility.php | 40 ++++ .../tests/cookies/resources/cookies-test-post.js | 5 + .../tests/cookies/resources/cookies-test-pre.js | 239 +++++++++++++++++++++ .../tests/cookies/resources/cookies-test-style.css | 12 ++ .../http/tests/cookies/resources/getCookies.cgi | 8 + .../http/tests/cookies/resources/resetCookies.js | 18 ++ .../http/tests/cookies/resources/setCookies.cgi | 9 + .../third-party-cookie-relaxing-iframe.html | 59 +++++ .../http/tests/cookies/script-tests/TEMPLATE.html | 13 ++ .../double-quoted-value-with-semi-colon.js | 11 + .../tests/cookies/script-tests/multiple-cookies.js | 13 ++ .../cookies/script-tests/simple-cookies-expired.js | 18 ++ .../cookies/script-tests/simple-cookies-max-age.js | 15 ++ .../cookies/simple-cookies-expired-expected.txt | 13 ++ .../http/tests/cookies/simple-cookies-expired.html | 13 ++ .../cookies/simple-cookies-max-age-expected.txt | 13 ++ .../http/tests/cookies/simple-cookies-max-age.html | 13 ++ .../third-party-cookie-relaxing-expected.txt | 47 ++++ .../tests/cookies/third-party-cookie-relaxing.html | 96 +++++++++ .../platform/android/layout_test_directories.txt | 1 + LayoutTests/platform/android/test_expectations.txt | 1 + 26 files changed, 734 insertions(+) create mode 100644 LayoutTests/http/tests/cookies/double-quoted-value-with-semi-colon-expected.txt create mode 100644 LayoutTests/http/tests/cookies/double-quoted-value-with-semi-colon.html create mode 100644 LayoutTests/http/tests/cookies/multiple-cookies-expected.txt create mode 100644 LayoutTests/http/tests/cookies/multiple-cookies.html create mode 100755 LayoutTests/http/tests/cookies/resources/clearCookies.cgi create mode 100644 LayoutTests/http/tests/cookies/resources/cookie-utility.php create mode 100644 LayoutTests/http/tests/cookies/resources/cookies-test-post.js create mode 100644 LayoutTests/http/tests/cookies/resources/cookies-test-pre.js create mode 100644 LayoutTests/http/tests/cookies/resources/cookies-test-style.css create mode 100755 LayoutTests/http/tests/cookies/resources/getCookies.cgi create mode 100644 LayoutTests/http/tests/cookies/resources/resetCookies.js create mode 100755 LayoutTests/http/tests/cookies/resources/setCookies.cgi create mode 100644 LayoutTests/http/tests/cookies/resources/third-party-cookie-relaxing-iframe.html create mode 100644 LayoutTests/http/tests/cookies/script-tests/TEMPLATE.html create mode 100644 LayoutTests/http/tests/cookies/script-tests/double-quoted-value-with-semi-colon.js create mode 100644 LayoutTests/http/tests/cookies/script-tests/multiple-cookies.js create mode 100644 LayoutTests/http/tests/cookies/script-tests/simple-cookies-expired.js create mode 100644 LayoutTests/http/tests/cookies/script-tests/simple-cookies-max-age.js create mode 100644 LayoutTests/http/tests/cookies/simple-cookies-expired-expected.txt create mode 100644 LayoutTests/http/tests/cookies/simple-cookies-expired.html create mode 100644 LayoutTests/http/tests/cookies/simple-cookies-max-age-expected.txt create mode 100644 LayoutTests/http/tests/cookies/simple-cookies-max-age.html create mode 100644 LayoutTests/http/tests/cookies/third-party-cookie-relaxing-expected.txt create mode 100644 LayoutTests/http/tests/cookies/third-party-cookie-relaxing.html (limited to 'LayoutTests') diff --git a/LayoutTests/http/tests/cookies/double-quoted-value-with-semi-colon-expected.txt b/LayoutTests/http/tests/cookies/double-quoted-value-with-semi-colon-expected.txt new file mode 100644 index 0000000..e3bf3f6 --- /dev/null +++ b/LayoutTests/http/tests/cookies/double-quoted-value-with-semi-colon-expected.txt @@ -0,0 +1,11 @@ +Test for Cookie parsing terminates at the first semicolon, ignoring quotes (16699) + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +Check that setting a cookie with a semi-colon in a duoble-quoted value works +PASS cookie is 'disorder="477beccb;richard"'. +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/http/tests/cookies/double-quoted-value-with-semi-colon.html b/LayoutTests/http/tests/cookies/double-quoted-value-with-semi-colon.html new file mode 100644 index 0000000..0b06db7 --- /dev/null +++ b/LayoutTests/http/tests/cookies/double-quoted-value-with-semi-colon.html @@ -0,0 +1,13 @@ + + + + + + + +

+
+ + + + diff --git a/LayoutTests/http/tests/cookies/multiple-cookies-expected.txt b/LayoutTests/http/tests/cookies/multiple-cookies-expected.txt new file mode 100644 index 0000000..35b58c1 --- /dev/null +++ b/LayoutTests/http/tests/cookies/multiple-cookies-expected.txt @@ -0,0 +1,13 @@ +This test checks that mulitple cookies are correctly set. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +Check setting several cookies without clearing. +PASS cookie is 'test=foobar'. +PASS cookie is 'test2=foobar; test=foobar'. +PASS cookie is 'test2=foobar; test3=foobar; test=foobar'. +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/http/tests/cookies/multiple-cookies.html b/LayoutTests/http/tests/cookies/multiple-cookies.html new file mode 100644 index 0000000..e5b14f3 --- /dev/null +++ b/LayoutTests/http/tests/cookies/multiple-cookies.html @@ -0,0 +1,13 @@ + + + + + + + +

+
+ + + + diff --git a/LayoutTests/http/tests/cookies/resources/clearCookies.cgi b/LayoutTests/http/tests/cookies/resources/clearCookies.cgi new file mode 100755 index 0000000..27896b7 --- /dev/null +++ b/LayoutTests/http/tests/cookies/resources/clearCookies.cgi @@ -0,0 +1,27 @@ +#!/usr/bin/perl -wT +use strict; + +print "Content-Type: text/plain\n"; +print "Cache-Control: no-store\n"; +print 'Cache-Control: no-cache="set-cookie"' . "\n"; + +my $cookie = $ENV{"HTTP_CLEAR_COOKIE"}; + +if ($cookie =~ /Max-Age/i) { + $cookie =~ s/Max-Age *= *[0-9]+/Max-Age=0/i; +} else { + $cookie .= ";" unless ($cookie =~ m/;$/); + $cookie .= " " unless ($cookie =~ m/ $/); + $cookie .= "Max-Age=0"; +} + +if ($cookie =~ /Expires/i) { + # Set the "Expires" field to UNIX epoch + $cookie =~ s/Expires *= *[^;]+/Expires=Thu, 01 Jan 1970 00:00:00 GMT/i; +} else { + $cookie .= ";" unless ($cookie =~ m/;$/); + $cookie .= " " unless ($cookie =~ m/ $/); + $cookie .= "Expires=Thu, 01 Jan 1970 00:00:00 GMT"; +} + +print "Set-Cookie: $cookie\n\n"; diff --git a/LayoutTests/http/tests/cookies/resources/cookie-utility.php b/LayoutTests/http/tests/cookies/resources/cookie-utility.php new file mode 100644 index 0000000..a33e7ac --- /dev/null +++ b/LayoutTests/http/tests/cookies/resources/cookie-utility.php @@ -0,0 +1,40 @@ + diff --git a/LayoutTests/http/tests/cookies/resources/cookies-test-post.js b/LayoutTests/http/tests/cookies/resources/cookies-test-post.js new file mode 100644 index 0000000..6970120 --- /dev/null +++ b/LayoutTests/http/tests/cookies/resources/cookies-test-post.js @@ -0,0 +1,5 @@ +shouldBeTrue("successfullyParsed"); +debug('
TEST COMPLETE'); + +// Make sure that we do not leak any cookies. +clearCookies(); diff --git a/LayoutTests/http/tests/cookies/resources/cookies-test-pre.js b/LayoutTests/http/tests/cookies/resources/cookies-test-pre.js new file mode 100644 index 0000000..80b0ff1 --- /dev/null +++ b/LayoutTests/http/tests/cookies/resources/cookies-test-pre.js @@ -0,0 +1,239 @@ +if (window.layoutTestController) + layoutTestController.dumpAsText(); + +function description(msg) +{ + // For MSIE 6 compatibility + var span = document.createElement("span"); + span.innerHTML = '

' + msg + '

On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".

'; + var description = document.getElementById("description"); + if (description.firstChild) + description.replaceChild(span, description.firstChild); + else + description.appendChild(span); +} + +function debug(msg) +{ + var span = document.createElement("span"); + document.getElementById("console").appendChild(span); // insert it first so XHTML knows the namespace + span.innerHTML = msg + '
'; +} + +function escapeHTML(text) +{ + return text.replace(/&/g, "&").replace(/PASS ' + escapeHTML(msg) + ''); +} + +function testFailed(msg) +{ + debug('FAIL ' + escapeHTML(msg) + ''); +} + +function areArraysEqual(_a, _b) +{ + if (_a.length !== _b.length) + return false; + for (var i = 0; i < _a.length; i++) + if (_a[i] !== _b[i]) + return false; + return true; +} + +function isMinusZero(n) +{ + // the only way to tell 0 from -0 in JS is the fact that 1/-0 is + // -Infinity instead of Infinity + return n === 0 && 1/n < 0; +} + +function isResultCorrect(_actual, _expected) +{ + if (_expected === 0) + return _actual === _expected && (1/_actual) === (1/_expected); + if (_actual === _expected) + return true; + if (typeof(_expected) == "number" && isNaN(_expected)) + return typeof(_actual) == "number" && isNaN(_actual); + if (Object.prototype.toString.call(_expected) == Object.prototype.toString.call([])) + return areArraysEqual(_actual, _expected); + return false; +} + +function stringify(v) +{ + if (v === 0 && 1/v < 0) + return "-0"; + else return "" + v; +} + +function shouldBe(_a, _b) +{ + if (typeof _a != "string" || typeof _b != "string") + debug("WARN: shouldBe() expects string arguments"); + var exception; + var _av; + try { + _av = eval(_a); + } catch (e) { + exception = e; + } + var _bv = eval(_b); + + if (exception) + testFailed(_a + " should be " + _bv + ". Threw exception " + exception); + else if (isResultCorrect(_av, _bv)) + testPassed(_a + " is " + _b); + else if (typeof(_av) == typeof(_bv)) + testFailed(_a + " should be " + _bv + ". Was " + stringify(_av) + "."); + else + testFailed(_a + " should be " + _bv + " (of type " + typeof _bv + "). Was " + _av + " (of type " + typeof _av + ")."); +} + +function shouldBeTrue(_a) { shouldBe(_a, "true"); } +function shouldBeFalse(_a) { shouldBe(_a, "false"); } +function shouldBeNaN(_a) { shouldBe(_a, "NaN"); } +function shouldBeNull(_a) { shouldBe(_a, "null"); } + +function shouldBeEqualToString(a, b) +{ + var unevaledString = '"' + b.replace(/"/g, "\"") + '"'; + shouldBe(a, unevaledString); +} + +function shouldBeUndefined(_a) +{ + var exception; + var _av; + try { + _av = eval(_a); + } catch (e) { + exception = e; + } + + if (exception) + testFailed(_a + " should be undefined. Threw exception " + exception); + else if (typeof _av == "undefined") + testPassed(_a + " is undefined."); + else + testFailed(_a + " should be undefined. Was " + _av); +} + +function shouldThrow(_a, _e) +{ + var exception; + var _av; + try { + _av = eval(_a); + } catch (e) { + exception = e; + } + + var _ev; + if (_e) + _ev = eval(_e); + + if (exception) { + if (typeof _e == "undefined" || exception == _ev) + testPassed(_a + " threw exception " + exception + "."); + else + testFailed(_a + " should throw " + (typeof _e == "undefined" ? "an exception" : _ev) + ". Threw exception " + exception + "."); + } else if (typeof _av == "undefined") + testFailed(_a + " should throw " + (typeof _e == "undefined" ? "an exception" : _ev) + ". Was undefined."); + else + testFailed(_a + " should throw " + (typeof _e == "undefined" ? "an exception" : _ev) + ". Was " + _av + "."); +} + +var cookies = new Array(); + +// This method sets the cookies using XMLHttpRequest. +// We do not set the cookie right away as it is forbidden by the XHR spec. +// FIXME: Add the possibility to set multiple cookies in a row. +function setCookies(cookie) +{ + try { + var xhr = new XMLHttpRequest(); + xhr.open("GET", "resources/setCookies.cgi", false); + xhr.setRequestHeader("SET_COOKIE", cookie); + xhr.send(null); + if (xhr.status == 200) { + // This is to clear them later. + cookies.push(cookie); + return true; + } else + return false; + } catch (e) { + return false; + } +} + +// Normalize a cookie string +function normalizeCookie(cookie) +{ + // Split the cookie string, sort it and then put it back together. + return cookie.split('; ').sort().join('; '); +} + +// We get the cookies throught an XMLHttpRequest. +function testCookies(result) +{ + var xhr = new XMLHttpRequest(); + xhr.open("GET", "resources/getCookies.cgi", false); + xhr.send(null); + var cookie = xhr.getResponseHeader("HTTP_COOKIE") == null ? '"null"' : xhr.getResponseHeader("HTTP_COOKIE"); + + // Normalize the cookie strings. + result = normalizeCookie(result); + cookie = normalizeCookie(cookie); + + if (cookie === result) + testPassed("cookie is '" + cookie + "'."); + else + testFailed("cookie was '" + cookie + "'. Expected '" + result + "'."); +} + +function clearAllCookies() +{ + var cookieString; + while (cookieString = document.cookie) { + var cookieName = cookieString.substr(0, cookieString.indexOf("=") || cookieString.length()); + cookies.push(cookieName); + clearCookies(); + } +} + +function clearCookies() +{ + if (!cookies.length) + return; + + try { + var xhr = new XMLHttpRequest(); + var cookie; + // We need to clean one cookie at a time because to be cleared the + // cookie must be exactly the same except for the "Max-Age" + // and "Expires" fields. + while (cookie = cookies.pop()) { + xhr.open("GET", "resources/clearCookies.cgi", false); + xhr.setRequestHeader("CLEAR_COOKIE", cookie); + xhr.send(null); + } + } catch (e) { + debug("Could not clear the cookies expect the following results to fail"); + } +} + +// This method check one cookie at a time. +function cookiesShouldBe(cookiesToSet, result) +{ + if (!setCookies(cookiesToSet)) { + testFailed("could not set cookie(s) " + cookiesToSet); + return; + } + testCookies(result); +} diff --git a/LayoutTests/http/tests/cookies/resources/cookies-test-style.css b/LayoutTests/http/tests/cookies/resources/cookies-test-style.css new file mode 100644 index 0000000..f12147c --- /dev/null +++ b/LayoutTests/http/tests/cookies/resources/cookies-test-style.css @@ -0,0 +1,12 @@ +.pass { + font-weight: bold; + color: green; +} +.fail { + font-weight: bold; + color: red; +} +#console { + white-space: pre-wrap; + font-family: monospace; +} diff --git a/LayoutTests/http/tests/cookies/resources/getCookies.cgi b/LayoutTests/http/tests/cookies/resources/getCookies.cgi new file mode 100755 index 0000000..c4377c3 --- /dev/null +++ b/LayoutTests/http/tests/cookies/resources/getCookies.cgi @@ -0,0 +1,8 @@ +#!/usr/bin/perl -wT +use strict; + +print "Content-Type: text/plain\n"; +print "Cache-Control: no-store\n"; +print 'Cache-Control: no-cache="set-cookie"' . "\n"; + +print "HTTP_COOKIE: " . ($ENV{HTTP_COOKIE} || "") . "\n\n"; diff --git a/LayoutTests/http/tests/cookies/resources/resetCookies.js b/LayoutTests/http/tests/cookies/resources/resetCookies.js new file mode 100644 index 0000000..577822a --- /dev/null +++ b/LayoutTests/http/tests/cookies/resources/resetCookies.js @@ -0,0 +1,18 @@ +function resetCookies() +{ + if (window.layoutTestController) + layoutTestController.setAlwaysAcceptCookies(true); + + // Due to cross-origin restrictions, we can only (simply) reset cookies for our current origin. + var url = "http://" + window.location.hostname +":8000/cookies/resources/cookie-utility.php?queryfunction=deleteCookies"; + var req = new XMLHttpRequest(); + try { + req.open('GET', url, false); + req.send(); + } catch (e) { + alert("Attempt to clear " + url + " cookies might have failed. Test results might be off from here on out. (" + e + ")"); + } + + if (window.layoutTestController) + layoutTestController.setAlwaysAcceptCookies(false); +} diff --git a/LayoutTests/http/tests/cookies/resources/setCookies.cgi b/LayoutTests/http/tests/cookies/resources/setCookies.cgi new file mode 100755 index 0000000..b9c4b21 --- /dev/null +++ b/LayoutTests/http/tests/cookies/resources/setCookies.cgi @@ -0,0 +1,9 @@ +#!/usr/bin/perl -wT +use strict; + +print "Content-Type: text/plain\n"; +print "Cache-Control: no-store\n"; +print 'Cache-Control: no-cache="set-cookie"' . "\n"; + +# We only map the SET_COOKIE request header to "Set-Cookie" +print "Set-Cookie: " . $ENV{"HTTP_SET_COOKIE"} . "\n\n"; diff --git a/LayoutTests/http/tests/cookies/resources/third-party-cookie-relaxing-iframe.html b/LayoutTests/http/tests/cookies/resources/third-party-cookie-relaxing-iframe.html new file mode 100644 index 0000000..d16964e --- /dev/null +++ b/LayoutTests/http/tests/cookies/resources/third-party-cookie-relaxing-iframe.html @@ -0,0 +1,59 @@ + + + + +HELLO THERE + + diff --git a/LayoutTests/http/tests/cookies/script-tests/TEMPLATE.html b/LayoutTests/http/tests/cookies/script-tests/TEMPLATE.html new file mode 100644 index 0000000..6483f50 --- /dev/null +++ b/LayoutTests/http/tests/cookies/script-tests/TEMPLATE.html @@ -0,0 +1,13 @@ + + + + + + + +

+
+ + + + diff --git a/LayoutTests/http/tests/cookies/script-tests/double-quoted-value-with-semi-colon.js b/LayoutTests/http/tests/cookies/script-tests/double-quoted-value-with-semi-colon.js new file mode 100644 index 0000000..9029875 --- /dev/null +++ b/LayoutTests/http/tests/cookies/script-tests/double-quoted-value-with-semi-colon.js @@ -0,0 +1,11 @@ +description( +'Test for <rdar://problem/5666078> Cookie parsing terminates at the first semicolon, ignoring quotes (16699)' +); + +clearAllCookies(); + +debug("Check that setting a cookie with a semi-colon in a duoble-quoted value works"); +cookiesShouldBe('disorder="477beccb;richard";Version=1;Path=/', 'disorder="477beccb;richard"'); +clearCookies(); + +successfullyParsed = true; diff --git a/LayoutTests/http/tests/cookies/script-tests/multiple-cookies.js b/LayoutTests/http/tests/cookies/script-tests/multiple-cookies.js new file mode 100644 index 0000000..618e224 --- /dev/null +++ b/LayoutTests/http/tests/cookies/script-tests/multiple-cookies.js @@ -0,0 +1,13 @@ +description( +"This test checks that mulitple cookies are correctly set." +); + +clearAllCookies(); + +debug("Check setting several cookies without clearing."); +cookiesShouldBe("test=foobar;", "test=foobar"); +cookiesShouldBe("test2=foobar;", "test=foobar; test2=foobar"); +cookiesShouldBe("test3=foobar;", "test=foobar; test2=foobar; test3=foobar"); +clearCookies(); + +successfullyParsed = true; diff --git a/LayoutTests/http/tests/cookies/script-tests/simple-cookies-expired.js b/LayoutTests/http/tests/cookies/script-tests/simple-cookies-expired.js new file mode 100644 index 0000000..61b70fb --- /dev/null +++ b/LayoutTests/http/tests/cookies/script-tests/simple-cookies-expired.js @@ -0,0 +1,18 @@ +description( +"This test checks that cookies are correctly set using Expires." +); + +clearAllCookies(); + +debug("Check that setting a simple cookie works."); +var date = new Date(); +date.setTime(date.getTime() + 60 * 1000); +cookiesShouldBe("test=foobar; Expires=" + date.toGMTString(), "test=foobar"); +clearCookies(); + +debug("Check setting a cookie that timed out."); +date.setTime(date.getTime() - 2 * 60 * 1000); +cookiesShouldBe("test2=foobar; Expires=" + date.toGMTString(), ""); +clearCookies(); + +successfullyParsed = true; diff --git a/LayoutTests/http/tests/cookies/script-tests/simple-cookies-max-age.js b/LayoutTests/http/tests/cookies/script-tests/simple-cookies-max-age.js new file mode 100644 index 0000000..1d87b13 --- /dev/null +++ b/LayoutTests/http/tests/cookies/script-tests/simple-cookies-max-age.js @@ -0,0 +1,15 @@ +description( +"This test checks that cookies are correctly set using Max-Age." +); + +clearAllCookies(); + +debug("Check that setting a simple cookie works."); +cookiesShouldBe("test=foobar; Max-Age=90000000", "test=foobar"); +clearCookies(); + +debug("Check setting a cookie that timed out."); +cookiesShouldBe("test2=foobar; Max-Age=0", ""); +clearCookies(); + +successfullyParsed = true; diff --git a/LayoutTests/http/tests/cookies/simple-cookies-expired-expected.txt b/LayoutTests/http/tests/cookies/simple-cookies-expired-expected.txt new file mode 100644 index 0000000..d0a5c55 --- /dev/null +++ b/LayoutTests/http/tests/cookies/simple-cookies-expired-expected.txt @@ -0,0 +1,13 @@ +This test checks that cookies are correctly set using Expires. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +Check that setting a simple cookie works. +PASS cookie is 'test=foobar'. +Check setting a cookie that timed out. +PASS cookie is ''. +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/http/tests/cookies/simple-cookies-expired.html b/LayoutTests/http/tests/cookies/simple-cookies-expired.html new file mode 100644 index 0000000..6015d0d --- /dev/null +++ b/LayoutTests/http/tests/cookies/simple-cookies-expired.html @@ -0,0 +1,13 @@ + + + + + + + +

+
+ + + + diff --git a/LayoutTests/http/tests/cookies/simple-cookies-max-age-expected.txt b/LayoutTests/http/tests/cookies/simple-cookies-max-age-expected.txt new file mode 100644 index 0000000..859c392 --- /dev/null +++ b/LayoutTests/http/tests/cookies/simple-cookies-max-age-expected.txt @@ -0,0 +1,13 @@ +This test checks that cookies are correctly set using Max-Age. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +Check that setting a simple cookie works. +PASS cookie is 'test=foobar'. +Check setting a cookie that timed out. +PASS cookie is ''. +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/http/tests/cookies/simple-cookies-max-age.html b/LayoutTests/http/tests/cookies/simple-cookies-max-age.html new file mode 100644 index 0000000..23eee96 --- /dev/null +++ b/LayoutTests/http/tests/cookies/simple-cookies-max-age.html @@ -0,0 +1,13 @@ + + + + + + + +

+
+ + + + diff --git a/LayoutTests/http/tests/cookies/third-party-cookie-relaxing-expected.txt b/LayoutTests/http/tests/cookies/third-party-cookie-relaxing-expected.txt new file mode 100644 index 0000000..184a97a --- /dev/null +++ b/LayoutTests/http/tests/cookies/third-party-cookie-relaxing-expected.txt @@ -0,0 +1,47 @@ +ALERT: + +ALERT: Allowing all cookies +ALERT: http://localhost:8000/cookies/resources/cookie-utility.php?queryfunction=deleteCookies +ALERT: XHR response - Deleted all cookies +ALERT: Test stage 1 document.cookie is: +ALERT: Restricting to first party only cookies +ALERT: http://localhost:8000/cookies/resources/cookie-utility.php?queryfunction=setFooCookie +ALERT: XHR response - Set the foo cookie +ALERT: Test stage 2 document.cookie is: +ALERT: + +ALERT: Allowing all cookies +ALERT: http://localhost:8000/cookies/resources/cookie-utility.php?queryfunction=deleteCookies +ALERT: XHR response - Deleted all cookies +ALERT: Test stage 3 document.cookie is: +ALERT: Restricting to first party only cookies +ALERT: http://localhost:8000/cookies/resources/cookie-utility.php?queryfunction=setFooAndBarCookie +ALERT: XHR response - Set the foo and bar cookies +ALERT: Test stage 4 document.cookie is: +ALERT: + +ALERT: Allowing all cookies +ALERT: http://localhost:8000/cookies/resources/cookie-utility.php?queryfunction=deleteCookies +ALERT: XHR response - Deleted all cookies +ALERT: Test stage 5 document.cookie is: +ALERT: http://localhost:8000/cookies/resources/cookie-utility.php?queryfunction=setFooCookie +ALERT: XHR response - Set the foo cookie +ALERT: Test stage 6 document.cookie is: foo=awesomevalue +ALERT: Restricting to first party only cookies +ALERT: http://localhost:8000/cookies/resources/cookie-utility.php?queryfunction=deleteCookies +ALERT: XHR response - Deleted all cookies +ALERT: Test stage 7 document.cookie is: +ALERT: + +ALERT: Allowing all cookies +ALERT: http://localhost:8000/cookies/resources/cookie-utility.php?queryfunction=deleteCookies +ALERT: XHR response - Deleted all cookies +ALERT: Test stage 8 document.cookie is: +ALERT: http://localhost:8000/cookies/resources/cookie-utility.php?queryfunction=setFooCookie +ALERT: XHR response - Set the foo cookie +ALERT: Test stage 9 document.cookie is: foo=awesomevalue +ALERT: Restricting to first party only cookies +ALERT: http://localhost:8000/cookies/resources/cookie-utility.php?queryfunction=setFooAndBarCookie +ALERT: XHR response - Set the foo and bar cookies +ALERT: Test stage 10 document.cookie is: bar=anotherawesomevalue; foo=awesomevalue + diff --git a/LayoutTests/http/tests/cookies/third-party-cookie-relaxing.html b/LayoutTests/http/tests/cookies/third-party-cookie-relaxing.html new file mode 100644 index 0000000..df9c4b9 --- /dev/null +++ b/LayoutTests/http/tests/cookies/third-party-cookie-relaxing.html @@ -0,0 +1,96 @@ + + + + + + + + + diff --git a/LayoutTests/platform/android/layout_test_directories.txt b/LayoutTests/platform/android/layout_test_directories.txt index da81ffd..703c4da 100755 --- a/LayoutTests/platform/android/layout_test_directories.txt +++ b/LayoutTests/platform/android/layout_test_directories.txt @@ -36,6 +36,7 @@ fast/url fast/xpath http/conf http/tests/appcache +http/tests/cookies http/tests/resources http/tests/ssl platform/android diff --git a/LayoutTests/platform/android/test_expectations.txt b/LayoutTests/platform/android/test_expectations.txt index 375a595..d0a039c 100644 --- a/LayoutTests/platform/android/test_expectations.txt +++ b/LayoutTests/platform/android/test_expectations.txt @@ -66,6 +66,7 @@ fast/events/touch/basic-multi-touch-events.html FAIL // Requires multi-touch ges fast/events/touch/touch-coords-in-zoom-and-scroll.html FAIL // Requires eventSender.zoomPageIn(),zoomPageOut() fast/events/touch/touch-target.html FAIL // Requires multi-touch gestures not supported by Android system fast/workers FAIL // workers not supported +http/tests/cookies/third-party-cookie-relaxing.html FAIL // We don't support conditional acceptance of third-party cookies http/tests/eventsource/workers FAIL // workers not supported http/tests/workers FAIL // workers not supported http/tests/xmlhttprequest/workers FAIL // workers not supported -- cgit v1.1