-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add WPTs for COOP: restrict-properties 1/*
This is the first patch adding WPT support for COOP: restrict-properties. It does a couple of things: - Add support for a "restricted" state in popup tests. - Add a few popup tests, from COOP:RP to others COOP values. Add them as tentatives in a new dedicated folder. - Add expectations for these tests. - Add a virtual test suite running these tests with the COOP: restrict-properties flag enabled. Currently no-effect. Bug: 1330586 Change-Id: Iccda420e58e787a35667baec3925e998b84a179b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3680118 Reviewed-by: Kent Tamura <tkent@chromium.org> Commit-Queue: Arthur Hemery <ahemery@chromium.org> Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org> Cr-Commit-Position: refs/heads/main@{#1021150}
- Loading branch information
1 parent
ed013f7
commit 98439fb
Showing
7 changed files
with
147 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
...oss-origin-opener-policy/tentative/restrict-properties/popup-with-cross-origin.https.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<!doctype html> | ||
<meta charset=utf-8> | ||
<meta name=timeout content=long> | ||
<script src=/resources/testharness.js></script> | ||
<script src=/resources/testharnessreport.js></script> | ||
<script src="/common/dispatcher/dispatcher.js"></script> | ||
<script src="/common/get-host-info.sub.js"></script> | ||
<script src="/common/utils.js"></script> | ||
<script src="../../resources/common.js"></script> | ||
<script src="../../resources/popup-test.js"></script> | ||
<script> | ||
|
||
[ | ||
{ | ||
"title": "popup with empty coop", | ||
"coop": "", | ||
"opener": "restricted" | ||
}, | ||
{ | ||
"title": "popup with coop unsafe-none", | ||
"coop": "unsafe-none", | ||
"opener": "restricted" | ||
}, | ||
{ | ||
"title": "popup with coop same-origin", | ||
"coop": "same-origin", | ||
"opener": "severed" | ||
}, | ||
{ | ||
"title": "popup with coop same-origin-allow-popups", | ||
"coop": "same-origin-allow-popups", | ||
"opener": "severed" | ||
}, | ||
{ | ||
"title": "popup with coop restrict-properties", | ||
"coop": "restrict-properties", | ||
"opener": "restricted" | ||
} | ||
].forEach(variant => { | ||
popup_test(`Cross-origin ${variant.title}`, CROSS_ORIGIN, | ||
{ coop: variant.coop }, variant.opener); | ||
}); | ||
|
||
</script> |
1 change: 1 addition & 0 deletions
1
...in-opener-policy/tentative/restrict-properties/popup-with-cross-origin.https.html.headers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Cross-Origin-Opener-Policy: restrict-properties |
44 changes: 44 additions & 0 deletions
44
...ross-origin-opener-policy/tentative/restrict-properties/popup-with-same-origin.https.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<!doctype html> | ||
<meta charset=utf-8> | ||
<meta name=timeout content=long> | ||
<script src=/resources/testharness.js></script> | ||
<script src=/resources/testharnessreport.js></script> | ||
<script src="/common/dispatcher/dispatcher.js"></script> | ||
<script src="/common/get-host-info.sub.js"></script> | ||
<script src="/common/utils.js"></script> | ||
<script src="../../resources/common.js"></script> | ||
<script src="../../resources/popup-test.js"></script> | ||
<script> | ||
|
||
[ | ||
{ | ||
"title": "popup with empty coop", | ||
"coop": "", | ||
"opener": "restricted" | ||
}, | ||
{ | ||
"title": "popup with coop unsafe-none", | ||
"coop": "unsafe-none", | ||
"opener": "restricted" | ||
}, | ||
{ | ||
"title": "popup with coop same-origin", | ||
"coop": "same-origin", | ||
"opener": "severed" | ||
}, | ||
{ | ||
"title": "popup with coop same-origin-allow-popups", | ||
"coop": "same-origin-allow-popups", | ||
"opener": "severed" | ||
}, | ||
{ | ||
"title": "popup with coop restrict-properties", | ||
"coop": "restrict-properties", | ||
"opener": "restricted" | ||
} | ||
].forEach(variant => { | ||
popup_test(`Same-origin ${variant.title}`, SAME_ORIGIN, | ||
{ coop: variant.coop }, variant.opener); | ||
}); | ||
|
||
</script> |
1 change: 1 addition & 0 deletions
1
...gin-opener-policy/tentative/restrict-properties/popup-with-same-origin.https.html.headers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Cross-Origin-Opener-Policy: restrict-properties |
44 changes: 44 additions & 0 deletions
44
.../cross-origin-opener-policy/tentative/restrict-properties/popup-with-same-site.https.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<!doctype html> | ||
<meta charset=utf-8> | ||
<meta name=timeout content=long> | ||
<script src=/resources/testharness.js></script> | ||
<script src=/resources/testharnessreport.js></script> | ||
<script src="/common/dispatcher/dispatcher.js"></script> | ||
<script src="/common/get-host-info.sub.js"></script> | ||
<script src="/common/utils.js"></script> | ||
<script src="../../resources/common.js"></script> | ||
<script src="../../resources/popup-test.js"></script> | ||
<script> | ||
|
||
[ | ||
{ | ||
"title": "popup with empty coop", | ||
"coop": "", | ||
"opener": "restricted" | ||
}, | ||
{ | ||
"title": "popup with coop unsafe-none", | ||
"coop": "unsafe-none", | ||
"opener": "restricted" | ||
}, | ||
{ | ||
"title": "popup with coop same-origin", | ||
"coop": "same-origin", | ||
"opener": "severed" | ||
}, | ||
{ | ||
"title": "popup with coop same-origin-allow-popups", | ||
"coop": "same-origin-allow-popups", | ||
"opener": "severed" | ||
}, | ||
{ | ||
"title": "popup with coop restrict-properties", | ||
"coop": "restrict-properties", | ||
"opener": "restricted" | ||
} | ||
].forEach(variant => { | ||
popup_test(`Same-site ${variant.title}`, SAME_SITE, | ||
{ coop: variant.coop }, variant.opener); | ||
}); | ||
|
||
</script> |
1 change: 1 addition & 0 deletions
1
...rigin-opener-policy/tentative/restrict-properties/popup-with-same-site.https.html.headers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Cross-Origin-Opener-Policy: restrict-properties |