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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/cookies/same-site/popup-same-site-post.html

Issue 2416033002: Fixed the behaviour of form submit to match the standard: no submit is taken place when the form is… (Closed)
Patch Set: Added Console Warning Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 <!doctype html> 1 <!doctype html>
2 <script src="/resources/testharness.js"></script> 2 <script src="/resources/testharness.js"></script>
3 <script src="/resources/testharnessreport.js"></script> 3 <script src="/resources/testharnessreport.js"></script>
4 <script src="/cookies/resources/testharness-helpers.js"></script> 4 <script src="/cookies/resources/testharness-helpers.js"></script>
5 <body>
5 <script> 6 <script>
6 if (window.location.hostname == "127.0.0.1") { 7 if (window.location.hostname == "127.0.0.1") {
7 window.location.hostname = ORIGINAL_HOST; 8 window.location.hostname = ORIGINAL_HOST;
8 } else if (window.location.hostname == ORIGINAL_HOST) { 9 } else if (window.location.hostname == ORIGINAL_HOST) {
9 async_test(t => { 10 async_test(t => {
10 clearKnownCookies(); 11 clearKnownCookies();
11 document.cookie = STRICT_DOM + "=1; SameSite=Strict; Max-Age=100; path=/ "; 12 document.cookie = STRICT_DOM + "=1; SameSite=Strict; Max-Age=100; path=/ ";
12 document.cookie = LAX_DOM + "=1; SameSite=Lax; Max-Age=100; path=/"; 13 document.cookie = LAX_DOM + "=1; SameSite=Lax; Max-Age=100; path=/";
13 document.cookie = NORMAL_DOM + "=1; Max-Age=100; path=/"; 14 document.cookie = NORMAL_DOM + "=1; Max-Age=100; path=/";
14 15
15 window.addEventListener("message", t.step_func_done(e => { 16 window.addEventListener("message", t.step_func_done(e => {
16 assert_equals(e.data.http[STRICT_DOM], "1", "strict"); 17 assert_equals(e.data.http[STRICT_DOM], "1", "strict");
17 assert_equals(e.data.http[LAX_DOM], "1", "lax"); 18 assert_equals(e.data.http[LAX_DOM], "1", "lax");
18 assert_equals(e.data.http[NORMAL_DOM], "1", "normal"); 19 assert_equals(e.data.http[NORMAL_DOM], "1", "normal");
19 assert_equals(e.data.document, STRICT_DOM + "=1; " + LAX_DOM + "=1; " + NORMAL_DOM + "=1"); 20 assert_equals(e.data.document, STRICT_DOM + "=1; " + LAX_DOM + "=1; " + NORMAL_DOM + "=1");
20 e.source.close(); 21 e.source.close();
21 })); 22 }));
22 23
23 var f = document.createElement('form'); 24 var f = document.createElement('form');
24 f.action = "http://" + ORIGINAL_HOST + ":8000/cookies/resources/post-coo kies-to-opener.php"; 25 f.action = "http://" + ORIGINAL_HOST + ":8000/cookies/resources/post-coo kies-to-opener.php";
25 f.method = "POST"; 26 f.method = "POST";
26 f.target = "_blank"; 27 f.target = "_blank";
27 window.onload = t.step_func(f.submit.bind(f)); 28 window.onload = t.step_func(f.submit.bind(f));
29 document.body.appendChild(f);
28 }, "'" + ORIGINAL_HOST + "' is same-site with itself, so samesite cookies ar e sent."); 30 }, "'" + ORIGINAL_HOST + "' is same-site with itself, so samesite cookies ar e sent.");
29 } 31 }
30 </script> 32 </script>
33 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698