test_1502055.html (1445B)
1 <!DOCTYPE HTML> 2 <html> 3 <head> 4 <title>Clear-Site-Data + 304 header.</title> 5 <script src="/tests/SimpleTest/SimpleTest.js"></script> 6 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 7 </head> 8 <body> 9 <script type="application/javascript"> 10 11 SimpleTest.waitForExplicitFinish(); 12 (async () => { 13 // Grant example.org first-party storage-access to allow service workers to 14 // run in the third-party context when dFPI is enabled. This won't be 15 // necessary anymore once we enable service worker partitioning in beta and 16 // release. See Bug 1730885. 17 await SpecialPowers.pushPermissions([ 18 { 19 type: "3rdPartyStorage^https://example.org", 20 allow: true, 21 context: document.location.origin, 22 }, 23 ]); 24 await SpecialPowers.pushPrefEnv({ 25 "set": [ 26 ["dom.serviceWorkers.exemptFromPerDomainMax", true], 27 ["dom.serviceWorkers.enabled", true], 28 ["dom.serviceWorkers.testing.enabled", true] 29 ] 30 }) 31 let ifr = document.createElement('iframe'); 32 ifr.src = "https://example.org/tests/netwerk/test/mochitests/iframe_1502055.html"; 33 document.body.appendChild(ifr); 34 addEventListener("message", e => { 35 if (e.data.type == "finish") { 36 ok(true, "Test passed"); 37 SimpleTest.finish(); 38 return; 39 } 40 41 if (e.data.type == "info") { 42 info(e.data.msg); 43 } 44 }); 45 })(); 46 </script> 47 48 </body> 49 </html>