fence-object-urn-iframe.https.html (869B)
1 <!DOCTYPE html> 2 <title>Test window.fence exists in URN iframes.</title> 3 <script src="/resources/testharness.js"></script> 4 <script src="/resources/testharnessreport.js"></script> 5 <script src="/common/utils.js"></script> 6 <script src="/common/dispatcher/dispatcher.js"></script> 7 <script src="resources/utils.js"></script> 8 9 <body> 10 <script> 11 async function runTest(generator_api) { 12 const frame = await attachIFrameContext({ 13 generator_api: generator_api, 14 register_beacon: false, 15 }); 16 17 await frame.execute(() => { 18 assert_true(window.fence != null, "window.fence should exist"); 19 }); 20 } 21 22 promise_test(async () => { 23 return runTest("fledge"); 24 }, 'window.fence in a URN iframe created with Protected Audience'); 25 26 promise_test(async () => { 27 return runTest("sharedstorage"); 28 }, 'window.fence in a URN iframe created with Shared Storage'); 29 30 </script> 31 </body>