automatic-beacon-cross-origin-false.https.html (1497B)
1 <!DOCTYPE html> 2 <title>Test window.fence.setReportEventDataForAutomaticBeacons from 3 SharedStorage</title> 4 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharnessreport.js"></script> 6 <script src="/common/utils.js"></script> 7 <script src="/common/dispatcher/dispatcher.js"></script> 8 <script src="resources/utils.js"></script> 9 <script src="/resources/testdriver.js"></script> 10 <script src="/resources/testdriver-actions.js"></script> 11 <script src="/resources/testdriver-vendor.js"></script> 12 <script src="/common/get-host-info.sub.js"></script> 13 <script src="resources/automatic-beacon-helper.js"></script> 14 15 <body> 16 <script> 17 promise_test(async(t) => { 18 const actions = new test_driver.Actions(); 19 const fencedframe = await attachFencedFrameContext({ 20 generator_api: 'fledge', 21 register_beacon: true, 22 }); 23 const beacon_event = { 24 eventType: "reserved.top_navigation_start", 25 eventData: "this is the beacon data", 26 destination: ["buyer"], 27 crossOriginExposed: false, 28 } 29 30 await setupAutomaticBeacon(fencedframe, [beacon_event], 31 "resources/close.html", NavigationTrigger.CrossOriginClick); 32 33 await actions.pointerMove(0, 0, {origin: fencedframe.element}) 34 .pointerDown() 35 .pointerUp() 36 .send(); 37 38 await verifyBeaconData(beacon_event.eventType, "<No data>", 39 get_host_info().HTTPS_REMOTE_ORIGIN); 40 }, 'Automatic beacon in a cross-origin subframe should send without data ' + 41 'when crossOrigin=false.'); 42 </script> 43 </body>