Title: [230263] trunk/LayoutTests
- Revision
- 230263
- Author
- [email protected]
- Date
- 2018-04-04 10:41:29 -0700 (Wed, 04 Apr 2018)
Log Message
Add a test for HttpOnly cookies used to load AppCache resources
https://bugs.webkit.org/show_bug.cgi?id=184305
<rdar://problem/39175648>
Reviewed by Brady Eidson.
* http/tests/appcache/document-cookie-http-only-expected.txt: Added.
* http/tests/appcache/document-cookie-http-only.php: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (230262 => 230263)
--- trunk/LayoutTests/ChangeLog 2018-04-04 17:34:04 UTC (rev 230262)
+++ trunk/LayoutTests/ChangeLog 2018-04-04 17:41:29 UTC (rev 230263)
@@ -1,3 +1,14 @@
+2018-04-04 Youenn Fablet <[email protected]>
+
+ Add a test for HttpOnly cookies used to load AppCache resources
+ https://bugs.webkit.org/show_bug.cgi?id=184305
+ <rdar://problem/39175648>
+
+ Reviewed by Brady Eidson.
+
+ * http/tests/appcache/document-cookie-http-only-expected.txt: Added.
+ * http/tests/appcache/document-cookie-http-only.php: Added.
+
2018-04-04 Ms2ger <[email protected]>
Test gardening for GTK.
Added: trunk/LayoutTests/http/tests/appcache/document-cookie-http-only-expected.txt (0 => 230263)
--- trunk/LayoutTests/http/tests/appcache/document-cookie-http-only-expected.txt (rev 0)
+++ trunk/LayoutTests/http/tests/appcache/document-cookie-http-only-expected.txt 2018-04-04 17:41:29 UTC (rev 230263)
@@ -0,0 +1,4 @@
+CONSOLE MESSAGE: line 1: ApplicationCache is deprecated. Please use ServiceWorkers instead.
+This tests that HttpOnly cookies set on the main document are used when accessing resources in the manifest.
+PASSED: Cookie should not be visible from _javascript_.
+PASSED: Cookie is set to 'bar'
Added: trunk/LayoutTests/http/tests/appcache/document-cookie-http-only.php (0 => 230263)
--- trunk/LayoutTests/http/tests/appcache/document-cookie-http-only.php (rev 0)
+++ trunk/LayoutTests/http/tests/appcache/document-cookie-http-only.php 2018-04-04 17:41:29 UTC (rev 230263)
@@ -0,0 +1,32 @@
+<?php
+setcookie("foo", "bar", 0, "/", null, null, true);
+?>
+<html manifest="resources/document-cookie.manifest">
+
+<div>This tests that HttpOnly cookies set on the main document are used when accessing resources in the manifest.</div>
+<div id="log">Not checked cookie yet</div>
+<div id="result">Not run yet</div>
+<script>
+if (window.testRunner) {
+ testRunner.dumpAsText()
+ testRunner.waitUntilDone();
+}
+
+var cookieTest = document.cookie === "" ? "PASSED" : "FAILED";
+log.innerHTML = cookieTest + ": Cookie should not be visible from _javascript_.";
+
+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>
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes