cross-origin-embedder-policy.https.window.js (1379B)
1 // META: script=/resources/testdriver.js 2 // META: script=/resources/testdriver-vendor.js 3 // META: script=/common/utils.js 4 // META: script=resources/fledge-util.sub.js 5 // META: timeout=long 6 7 "use strict"; 8 9 promise_test(async test => { 10 const uuid = generateUuid(test); 11 12 let otherWindow = await createTopLevelWindow(test, OTHER_ORIGIN1); 13 14 // Join a cross-origin InterestGroup in a top-level window navigated to its origin. 15 // Has to be top-level to avoid being subject to the Cross-Origin-Embedder-Policy 16 // of this page. 17 await runInFrame(test, otherWindow, 18 `await joinInterestGroup(test_instance, "${uuid}");`); 19 20 // Run an auction in this frame using the other origin as a bidder. The bidding 21 // script load should not be blocked by the COEP that blocks cross-origin 22 // resources. 23 await runBasicFledgeTestExpectingWinner( 24 test, uuid, 25 { interestGroupBuyers: [OTHER_ORIGIN1] }); 26 }, 'COEP does not block bidder scripts.'); 27 28 promise_test(async test => { 29 const uuid = generateUuid(test); 30 31 // Run an auction with a cross-origin seller script, it should not be blocked 32 // by COEP. 33 await joinGroupAndRunBasicFledgeTestExpectingWinner( 34 test, 35 { uuid, 36 auctionConfigOverrides : {seller: OTHER_ORIGIN1, 37 decisionLogicURL: createDecisionScriptURL(uuid, { origin: OTHER_ORIGIN1 }) 38 }}); 39 }, 'COEP does not block seller scripts.');