config-cross-origin-apis.https.html (1481B)
1 <!DOCTYPE html> 2 <title>Test default permission policy features gating (*)</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 <script src="/common/get-host-info.sub.js"></script> 9 10 <body> 11 <script> 12 promise_test(async(t) => { 13 const key = token(); 14 15 const fencedframe = attachFencedFrame( 16 await generateURNFromFledge( 17 "resources/config-cross-origin-apis-inner.https.html", 18 [key])); 19 20 // The fenced frame will send its attribution reporting result and then 21 // attempt to redirect to a remote origin page. 22 const resp = await nextValueFromServer(key); 23 assert_equals(resp, "0", 24 "The call to getNestedConfigs() should not have returned anything."); 25 }, 'A fenced frame that navigates itself to a cross origin page loses ' + 26 'window.fence API access.'); 27 28 promise_test(async(t) => { 29 const key = token(); 30 31 const fencedframe = attachFencedFrame( 32 await generateURNFromFledge( 33 "resources/config-embed-cross-origin-iframe.https.html", 34 [key])); 35 36 const resp = await nextValueFromServer(key); 37 assert_equals(resp, "0", 38 "The call to getNestedConfigs() should not have returned anything."); 39 }, 'A cross-origin iframe inside a fenced frame does not get ' + 40 'window.fence API access.'); 41 42 </script> 43 </body> 44 </html>