Title: [229755] branches/safari-605-branch/LayoutTests
- Revision
- 229755
- Author
- jmarc...@apple.com
- Date
- 2018-03-20 08:21:29 -0700 (Tue, 20 Mar 2018)
Log Message
Cherry-pick r229733. rdar://problem/38651613
Modified Paths
Added Paths
Diff
Modified: branches/safari-605-branch/LayoutTests/ChangeLog (229754 => 229755)
--- branches/safari-605-branch/LayoutTests/ChangeLog 2018-03-20 15:21:26 UTC (rev 229754)
+++ branches/safari-605-branch/LayoutTests/ChangeLog 2018-03-20 15:21:29 UTC (rev 229755)
@@ -1,5 +1,21 @@
2018-03-20 Jason Marcell <jmarc...@apple.com>
+ Cherry-pick r229733. rdar://problem/38651613
+
+ 2018-03-19 Brady Eidson <beid...@apple.com>
+
+ Add a layout test verifying AppCache resource fetches have the document's cookie in place.
+ https://bugs.webkit.org/show_bug.cgi?id=183757
+
+ Reviewed by Alex Christensen.
+
+ * http/tests/appcache/document-cookie-expected.txt: Added.
+ * http/tests/appcache/document-cookie.php: Added.
+ * http/tests/appcache/resources/cookie-protected-script.php: Added.
+ * http/tests/appcache/resources/document-cookie.manifest: Added.
+
+2018-03-20 Jason Marcell <jmarc...@apple.com>
+
Cherry-pick r229691. rdar://problem/38651615
2018-03-16 Youenn Fablet <you...@apple.com>
Added: branches/safari-605-branch/LayoutTests/http/tests/appcache/document-cookie-expected.txt (0 => 229755)
--- branches/safari-605-branch/LayoutTests/http/tests/appcache/document-cookie-expected.txt (rev 0)
+++ branches/safari-605-branch/LayoutTests/http/tests/appcache/document-cookie-expected.txt 2018-03-20 15:21:29 UTC (rev 229755)
@@ -0,0 +1,3 @@
+CONSOLE MESSAGE: line 1: ApplicationCache is deprecated. Please use ServiceWorkers instead.
+This tests that cookies set on the main document are used when accessing resources in the manifest.
+PASSED: Cookie is set to 'bar'
Added: branches/safari-605-branch/LayoutTests/http/tests/appcache/document-cookie.php (0 => 229755)
--- branches/safari-605-branch/LayoutTests/http/tests/appcache/document-cookie.php (rev 0)
+++ branches/safari-605-branch/LayoutTests/http/tests/appcache/document-cookie.php 2018-03-20 15:21:29 UTC (rev 229755)
@@ -0,0 +1,28 @@
+<?php
+setcookie("foo", "bar", 0, "/");
+?>
+<html manifest="resources/document-cookie.manifest">
+
+<div>This tests that cookies set on the main document are used when accessing resources in the manifest.</div>
+<div id="result">Not run yet</div>
+<script>
+if (window.testRunner) {
+ testRunner.dumpAsText()
+ testRunner.waitUntilDone();
+}
+
+function dynamicScriptLoad() {
+ var script = document.createElement("script");
+ script.type = "text/_javascript_";
+ script.src = ""
+ document.getElementsByTagName("head")[0].appendChild(script);
+}
+
+function cached()
+{
+ setTimeout("dynamicScriptLoad();", 0);
+}
+
+applicationCache.addEventListener('cached', cached, false);
+</script>
+</html>
Added: branches/safari-605-branch/LayoutTests/http/tests/appcache/resources/cookie-protected-script.php (0 => 229755)
--- branches/safari-605-branch/LayoutTests/http/tests/appcache/resources/cookie-protected-script.php (rev 0)
+++ branches/safari-605-branch/LayoutTests/http/tests/appcache/resources/cookie-protected-script.php 2018-03-20 15:21:29 UTC (rev 229755)
@@ -0,0 +1,18 @@
+<?php
+header("Content-type:application/_javascript_");
+
+if (isset($_COOKIE["foo"])) {
+ echo "var cookieVal = '" . $_COOKIE["foo"] . "';";
+} else {
+ echo "var cookieVal = '<null>';";
+}
+
+?>
+
+if (cookieVal == "bar")
+ document.getElementById("result").innerHTML = "PASSED: Cookie is set to 'bar'";
+else
+ document.getElementById("result").innerHTML = "FAILED: Cookie should be 'bar', is set to '" + cookieVal + "'";
+
+if (window.testRunner)
+ testRunner.notifyDone();
Added: branches/safari-605-branch/LayoutTests/http/tests/appcache/resources/document-cookie.manifest (0 => 229755)
--- branches/safari-605-branch/LayoutTests/http/tests/appcache/resources/document-cookie.manifest (rev 0)
+++ branches/safari-605-branch/LayoutTests/http/tests/appcache/resources/document-cookie.manifest 2018-03-20 15:21:29 UTC (rev 229755)
@@ -0,0 +1,4 @@
+CACHE MANIFEST
+/appcache/resources/cookie-protected-script.php
+NETWORK:
+/favicon.ico
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes