| <!doctype html> |
| <meta name=timeout content=long> |
| <title>Opening a restrict-properties</title> |
| <script src=/resources/testharness.js></script> |
| <script src=/resources/testharnessreport.js></script> |
| <script src="/common/get-host-info.sub.js"></script> |
| <script src="/common/utils.js"></script> |
| <script src="/common/dispatcher/dispatcher.js"></script> |
| <script src="/html/cross-origin-opener-policy/resources/common.js"></script> |
| <script |
| src="/html/cross-origin-opener-policy/reporting/resources/reporting-common.js?pipe=sub&report_id=c265b07fbb3bffa2cd2a5179d686ced2&report_only_id=b4ea2bc3c537541b4fd408dc8f2b5c39"></script> |
| |
| <script> |
| |
| let tests = [ |
| // popup origin, popup COOP, popup COEP, popup COOP report-only, popup COEP report-only, expected reports |
| |
| // Open a same-origin popup with COOP unsafe-none, which mismatches |
| // with the current document (opener) COOP (restrict-properties) values. |
| [ |
| SAME_ORIGIN, |
| "unsafe-none", |
| "", |
| "", |
| "", |
| [ |
| { |
| "endpoint": reportEndpoint, |
| "report": { |
| "body": { |
| "disposition": "enforce", |
| "effectivePolicy": "restrict-properties", |
| "nextResponseURL": /uuid=EXECUTOR_UUID$/, // next document URL |
| "type": "navigation-from-response" |
| }, |
| "url": `${location.href}`, |
| "type": "coop" |
| } |
| } |
| ] |
| ], |
| |
| // Open a cross-origin popup with COOP unsafe-none, which mismatches |
| // with the current document (opener) COOP (restrict-properties) values. |
| [ |
| CROSS_ORIGIN, |
| "unsafe-none", |
| "", |
| "", |
| "", |
| [ |
| { |
| "endpoint": reportEndpoint, |
| "report": { |
| "body": { |
| "disposition": "enforce", |
| "effectivePolicy": "restrict-properties", |
| "nextResponseURL": /uuid=EXECUTOR_UUID$/, // next document URL |
| "type": "navigation-from-response" |
| }, |
| "url": `${location.href}`, |
| "type": "coop" |
| } |
| } |
| ] |
| ], |
| |
| // Open a same-origin popup with COOP restrict-properties, which matches with |
| // the current document (opener) COOP (restrict-properties) value. |
| [ |
| SAME_ORIGIN, |
| "restrict-properties", |
| "", |
| "", |
| "", |
| [] |
| ], |
| ]; |
| |
| runNavigationReportingTests(document.title, tests); |
| |
| </script> |
| |