fence-api.https.html (911B)
1 <!DOCTYPE html> 2 <script src="/resources/testharness.js"></script> 3 <script src="/resources/testharnessreport.js"></script> 4 <script src="/common/utils.js"></script> 5 <script src="resources/utils.js"></script> 6 <title>Test window.fence object</title> 7 8 <body> 9 <script> 10 promise_test(async () => { 11 12 // Check that window.fence is undefined in the top-level frame. 13 assert_true(window.fence == null, 14 "window.fence should only be visible inside fenced frames."); 15 assert_true(fence == null, 16 "fence should only be visible inside fenced frames."); 17 18 // Create a fenced frame. 19 const fence_api_token = token(); 20 const frame_url = generateURL("resources/fence-api-inner.https.html", 21 [fence_api_token]); 22 attachFencedFrame(frame_url); 23 24 // Wait for the fenced frame to complete its fence API tests. 25 await nextValueFromServer(fence_api_token); 26 27 }, "window.fence"); 28 </script> 29 </body>