config-cross-origin-iframe.https.html (929B)
1 <!DOCTYPE html> 2 <script src="utils.js"></script> 3 <script src="/common/get-host-info.sub.js"></script> 4 <title>Fenced frame attribution reporting self navigation test</title> 5 6 <body> 7 <script> 8 // This helper function will navigate a child iframe to a remote origin page. 9 // It will then check to make sure that window.fence APIs are not allowed after 10 // the navigation. This code is meant to run in a fenced frame. 11 const [key] = parseKeylist(); 12 13 const event = { 14 eventType: "reserved.top_navigation_commit", 15 eventData: "data!", 16 destination: ["buyer"], 17 } 18 19 // These should gracefully fail without badmessaging the renderer. 20 window.fence.setReportEventDataForAutomaticBeacons(event); 21 window.fence.reportEvent(event); 22 23 const configs = window.fence.getNestedConfigs(); 24 25 // Report how many configs were obtained. Cross-origin pages should not 26 // obtain any nested configs. 27 writeValueToServer(key, configs.length); 28 29 </script> 30 </body>