summaryrefslogtreecommitdiffstats
path: root/LayoutTests/fast/cookies
diff options
context:
space:
mode:
Diffstat (limited to 'LayoutTests/fast/cookies')
-rw-r--r--LayoutTests/fast/cookies/local-file-can-set-cookies-expected.txt11
-rw-r--r--LayoutTests/fast/cookies/local-file-can-set-cookies.html23
2 files changed, 34 insertions, 0 deletions
diff --git a/LayoutTests/fast/cookies/local-file-can-set-cookies-expected.txt b/LayoutTests/fast/cookies/local-file-can-set-cookies-expected.txt
new file mode 100644
index 0000000..0886317
--- /dev/null
+++ b/LayoutTests/fast/cookies/local-file-can-set-cookies-expected.txt
@@ -0,0 +1,11 @@
+This test checks that a local file can set cookies. See: rdar://problem/5379090 REGRESSION: Cannot set cookies for local files
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS document.cookie.indexOf('ppkcookie1=testcookie') is -1
+PASS document.cookie.indexOf('ppkcookie1=testcookie') >= 0 is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/cookies/local-file-can-set-cookies.html b/LayoutTests/fast/cookies/local-file-can-set-cookies.html
new file mode 100644
index 0000000..10468ae
--- /dev/null
+++ b/LayoutTests/fast/cookies/local-file-can-set-cookies.html
@@ -0,0 +1,23 @@
+<html>
+<head>
+<title>Local File Can Set Cookies</title>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script>
+ description('This test checks that a local file can set cookies. See: rdar://problem/5379090 REGRESSION: Cannot set cookies for local files');
+
+ shouldBe("document.cookie.indexOf('ppkcookie1=testcookie')", "-1");
+ document.cookie = 'ppkcookie1=testcookie';
+ shouldBeTrue("document.cookie.indexOf('ppkcookie1=testcookie') >= 0");
+
+ var successfullyParsed = true;
+</script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
+