Title: [229691] trunk/LayoutTests
Revision
229691
Author
you...@apple.com
Date
2018-03-16 19:43:24 -0700 (Fri, 16 Mar 2018)

Log Message

Add a test verifying that an AppCache manifest request includes credentials
https://bugs.webkit.org/show_bug.cgi?id=183716

Reviewed by Chris Dumez.

* http/tests/appcache/appcache-cookies-expected.txt: Added.
* http/tests/appcache/appcache-cookies.html: Added.
* http/tests/appcache/resources/appcache-cookies-test.html: Added.
* http/tests/appcache/resources/manifest-if-cookie.php: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (229690 => 229691)


--- trunk/LayoutTests/ChangeLog	2018-03-17 00:39:45 UTC (rev 229690)
+++ trunk/LayoutTests/ChangeLog	2018-03-17 02:43:24 UTC (rev 229691)
@@ -1,3 +1,15 @@
+2018-03-16  Youenn Fablet  <you...@apple.com>
+
+        Add a test verifying that an AppCache manifest request includes credentials
+        https://bugs.webkit.org/show_bug.cgi?id=183716
+
+        Reviewed by Chris Dumez.
+
+        * http/tests/appcache/appcache-cookies-expected.txt: Added.
+        * http/tests/appcache/appcache-cookies.html: Added.
+        * http/tests/appcache/resources/appcache-cookies-test.html: Added.
+        * http/tests/appcache/resources/manifest-if-cookie.php: Added.
+
 2018-03-15  Ryan Haddad  <ryanhad...@apple.com>
 
         Skip editing/pasteboard/data-transfer-get-data-on-pasting-html-uses-blob-url.html on iOS.

Added: trunk/LayoutTests/http/tests/appcache/appcache-cookies-expected.txt (0 => 229691)


--- trunk/LayoutTests/http/tests/appcache/appcache-cookies-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/http/tests/appcache/appcache-cookies-expected.txt	2018-03-17 02:43:24 UTC (rev 229691)
@@ -0,0 +1,2 @@
+CONSOLE MESSAGE: line 1: ApplicationCache is deprecated. Please use ServiceWorkers instead.
+PASS

Added: trunk/LayoutTests/http/tests/appcache/appcache-cookies.html (0 => 229691)


--- trunk/LayoutTests/http/tests/appcache/appcache-cookies.html	                        (rev 0)
+++ trunk/LayoutTests/http/tests/appcache/appcache-cookies.html	2018-03-17 02:43:24 UTC (rev 229691)
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src=""
+</head>
+<body>
+<script>
+if (window.testRunner) {
+    testRunner.dumpAsText()
+    testRunner.waitUntilDone();
+}
+
+document.cookie = "name=value";
+testCookies("name=value");
+
+window.location.href = ""
+</script>
+</body>
+</html>

Added: trunk/LayoutTests/http/tests/appcache/resources/appcache-cookies-test.html (0 => 229691)


--- trunk/LayoutTests/http/tests/appcache/resources/appcache-cookies-test.html	                        (rev 0)
+++ trunk/LayoutTests/http/tests/appcache/resources/appcache-cookies-test.html	2018-03-17 02:43:24 UTC (rev 229691)
@@ -0,0 +1,22 @@
+<html manifest="manifest-if-cookie.php">
+<script>
+function cached()
+{
+    document.body.innerHTML = "PASS"
+    if (window.testRunner)
+        testRunner.notifyDone();
+}
+
+function error()
+{
+    document.body.innerHTML = "FAIL";
+    if (window.testRunner)
+        testRunner.notifyDone();
+}
+
+applicationCache.addEventListener('cached', cached, false);
+applicationCache.addEventListener('noupdate', cached, false);
+applicationCache.addEventListener('error', error, false);
+applicationCache.addEventListener('obsolete', error, false);
+</script>
+</html>

Added: trunk/LayoutTests/http/tests/appcache/resources/manifest-if-cookie.php (0 => 229691)


--- trunk/LayoutTests/http/tests/appcache/resources/manifest-if-cookie.php	                        (rev 0)
+++ trunk/LayoutTests/http/tests/appcache/resources/manifest-if-cookie.php	2018-03-17 02:43:24 UTC (rev 229691)
@@ -0,0 +1,12 @@
+<?php
+
+if (isset($_COOKIE['name'])) {
+    header('Content-Type: text/html; ' . $_COOKIE['name']);
+    print("CACHE MANIFEST\n");
+    print("simple.txt\n");
+    return;
+}
+header('HTTP/1.0 404 Not Found');
+header('Content-Type: text/html; ' . count($_COOKIE));
+
+?>
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to