diff --git a/html/cross-origin-embedder-policy/credentialless/reporting-navigation.tentative.https.html b/html/cross-origin-embedder-policy/credentialless/reporting-navigation.tentative.https.html new file mode 100644 index 00000000000000..1742d80da27012 --- /dev/null +++ b/html/cross-origin-embedder-policy/credentialless/reporting-navigation.tentative.https.html @@ -0,0 +1,136 @@ + + + +
+ + + + + + diff --git a/html/cross-origin-embedder-policy/credentialless/reporting-subresource-corp.tentative.https.html b/html/cross-origin-embedder-policy/credentialless/reporting-subresource-corp.tentative.https.html new file mode 100644 index 00000000000000..823dc32c41df17 --- /dev/null +++ b/html/cross-origin-embedder-policy/credentialless/reporting-subresource-corp.tentative.https.html @@ -0,0 +1,186 @@ + + + + + + + + + + diff --git a/html/cross-origin-embedder-policy/reporting-subresource-corp.https.html b/html/cross-origin-embedder-policy/reporting-subresource-corp.https.html index ad8a8e99eb99e6..9bcf37b0cdfe32 100644 --- a/html/cross-origin-embedder-policy/reporting-subresource-corp.https.html +++ b/html/cross-origin-embedder-policy/reporting-subresource-corp.https.html @@ -16,6 +16,9 @@ const WORKER_URL = `${ORIGIN}${BASE}/reporting-worker.js` + '?pipe=header(cross-origin-embedder-policy,require-corp)' + `|header(cross-origin-embedder-policy-report-only,require-corp)`; +const REPORTING_FRAME_URL = `${ORIGIN}${BASE}/reporting-empty-frame.html` + + '?pipe=header(cross-origin-embedder-policy,require-corp)' + + `|header(cross-origin-embedder-policy-report-only,require-corp)`; function wait(ms) { return new Promise(resolve => step_timeout(resolve, ms)); @@ -117,18 +120,17 @@ }, }, { tag: 'between service worker and page', - contextUrl: `${ORIGIN}${BASE}/reporting-empty-frame.html`, + contextUrl: REPORTING_FRAME_URL, run: async (test, url) => { - const SCOPE = `${BASE}/reporting-empty-frame.html`; // Here we use a Service Worker without COEP. const WORKER_URL = `${ORIGIN}${BASE}/sw.js`; - const reg = - await service_worker_unregister_and_register(test, WORKER_URL, SCOPE); + const reg = await service_worker_unregister_and_register( + test, WORKER_URL, REPORTING_FRAME_URL); test.add_cleanup(() => reg.unregister()); const worker = reg.installing || reg.waiting || reg.active; worker.addEventListener('error', test.unreached_func('Worker.onerror')); return await fetchInFrame( - test, `${ORIGIN}${BASE}/reporting-empty-frame.html`, url); + test, REPORTING_FRAME_URL, url); }, }]; diff --git a/html/cross-origin-embedder-policy/reporting-to-endpoint.https.html b/html/cross-origin-embedder-policy/reporting-to-endpoint.https.html index 066943a47254d2..667fb1f1d5eb69 100644 --- a/html/cross-origin-embedder-policy/reporting-to-endpoint.https.html +++ b/html/cross-origin-embedder-policy/reporting-to-endpoint.https.html @@ -21,6 +21,9 @@ // . const { REMOTE_ORIGIN } = get_host_info(); const BASE = new URL("resources", location).pathname +const FRAME_URL = `resources/reporting-empty-frame.html` + + '?pipe=header(cross-origin-embedder-policy,require-corp)' + + `|header(cross-origin-embedder-policy-report-only,require-corp)`; function wait(ms) { return new Promise(resolve => step_timeout(resolve, ms)); @@ -85,7 +88,7 @@ const iframe = document.createElement('iframe'); t.add_cleanup(() => iframe.remove()); - iframe.src = `resources/reporting-empty-frame.html` + iframe.src = FRAME_URL document.body.appendChild(iframe); await new Promise(resolve => { iframe.addEventListener('load', resolve, {once: true}); @@ -106,7 +109,7 @@ const iframe = document.createElement('iframe'); t.add_cleanup(() => iframe.remove()); - iframe.src = `resources/reporting-empty-frame.html` + iframe.src = FRAME_URL document.body.appendChild(iframe); await new Promise(resolve => { iframe.addEventListener('load', resolve, {once: true}); @@ -135,7 +138,7 @@ const iframe = document.createElement('iframe'); t.add_cleanup(() => iframe.remove()); - iframe.src = 'resources/reporting-empty-frame.html'; + iframe.src = FRAME_URL; const targetUrl = `/common/blank.html?${token()}`; iframe.addEventListener('load', t.step_func(() => { const nested = iframe.contentDocument.createElement('iframe'); diff --git a/html/cross-origin-embedder-policy/resources/reporting-empty-frame.html.headers b/html/cross-origin-embedder-policy/resources/reporting-empty-frame.html.headers deleted file mode 100644 index b7c8b304178b4f..00000000000000 --- a/html/cross-origin-embedder-policy/resources/reporting-empty-frame.html.headers +++ /dev/null @@ -1,2 +0,0 @@ -cross-origin-embedder-policy: require-corp; report-to="endpoint" -cross-origin-embedder-policy-report-only: require-corp; report-to="report-only-endpoint"