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=/"; }); |
+} |
+ |