partitioned-cookies-3p-window.html (1105B)
1 <!DOCTYPE html> 2 <head> 3 <meta charset="utf-8"/> 4 <meta name="timeout" content="long"> 5 <title>Service Worker: Partitioned Cookies 3P Window</title> 6 <script src="/resources/testharness.js"></script> 7 </head> 8 9 <body> 10 <script> 11 12 promise_test(async t => { 13 assert_true( 14 location.search.includes('origin='), 'First party origin passed'); 15 const first_party_origin = decodeURIComponent( 16 location.search.split('origin=')[1]); 17 const iframe = document.createElement('iframe'); 18 iframe.src = new URL( 19 './partitioned-cookies-3p-frame.html', 20 first_party_origin + location.pathname).href; 21 document.body.appendChild(iframe); 22 await fetch_tests_from_window(iframe.contentWindow); 23 24 const credentialless_frame = document.createElement('iframe'); 25 credentialless_frame.credentialless = true; 26 credentialless_frame.src = new URL( 27 './partitioned-cookies-3p-credentialless-frame.html', 28 first_party_origin + location.pathname).href; 29 document.body.appendChild(credentialless_frame); 30 await fetch_tests_from_window(credentialless_frame.contentWindow); 31 }); 32 33 </script> 34 </body> 35 </html>