Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(766)

Unified Diff: third_party/WebKit/LayoutTests/http/tests/cookies/resources/testharness-helpers.js

Issue 1783813002: SameSite: Strict/Lax behavior. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@strict-lax
Patch Set: Comment. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/http/tests/cookies/resources/testharness-helpers.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/cookies/resources/testharness-helpers.js b/third_party/WebKit/LayoutTests/http/tests/cookies/resources/testharness-helpers.js
new file mode 100644
index 0000000000000000000000000000000000000000..1bb89669da2e5ee02533aa2bc85b7c4fdf00f449
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/cookies/resources/testharness-helpers.js
@@ -0,0 +1,19 @@
+if (window.testRunner) {
+ testRunner.setAlwaysAcceptCookies(true);
+}
+
+var ORIGINAL_HOST = "127.0.0.1";
+var TEST_ROOT = "example.test";
+var TEST_HOST = "cookies." + TEST_ROOT;
+var TEST_SUB = "subdomain." + TEST_HOST;
+
+var STRICT_DOM = "strict_from_dom";
+var LAX_DOM = "lax_from_dom";
+var NORMAL_DOM = "normal_from_dom";
+
+// Clear the three well-known cookies.
+function clearKnownCookies() {
+ var cookies = [ STRICT_DOM, LAX_DOM, NORMAL_DOM ];
+ cookies.forEach(c => { document.cookie = c + "=0; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/"; });
+}
+

Powered by Google App Engine
This is Rietveld 408576698