blob: 3fa15efbebcd7d31ef8c5c635fce3c180df2ca92 [file] [log] [blame]
<!doctype html>
<meta charset=utf-8>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src="/common/get-host-info.sub.js"></script>
<script src="/html/cross-origin-opener-policy/resources/common.js"></script>
<div id=log></div>
<script>
let tests = [
// popup Origin, popup COOP, expect opener
// None of the following should be recognized as "same-origin" (hence the
// "expected opener" value of `true`).
[SAME_ORIGIN, 'same-origin; report-to="foo', true],
[SAME_ORIGIN, 'same-origin; report-to="foo"x', true],
[SAME_ORIGIN, 'same-origin; report-to="foo\\a"', true],
// All of the following should be recognized as "same-origin" (hence the
// "expected opener" value of `false`).
[SAME_ORIGIN, 'same-origin', false],
[SAME_ORIGIN, 'same-origin; report-to="foo"', false],
[SAME_ORIGIN, 'same-origin; report-to="foo-123"', false],
[SAME_ORIGIN, 'same-origin; report-to="foo 123"', false],
[SAME_ORIGIN, 'same-origin; report-to="foo\\\\123"', false],
[SAME_ORIGIN, 'same-origin; report-to="foo\\"123"', false],
[SAME_ORIGIN, 'same-origin; report-to="foo"; bar=baz', false],
];
run_coop_tests("unspecified", tests);
</script>