-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1927535 [wpt PR 48842] - [Permissions Policy] update default for …
…`focus-without-user-activation`, a=testonly Automatic update from web-platform-tests [Permissions Policy] update default for `focus-without-user-activation` According to discussion[1] in webappsec WG and WHATWG, we should set the default of `focus-without-user-activation` permissions policy to `EnableForSelf`. [1]: w3c/webappsec-permissions-policy#273 (comment) Bug: 371112534 Change-Id: I7deb757d0074e1262d07f768e58ea53a99d5faa5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5950528 Reviewed-by: Sanket Joshi <[email protected]> Commit-Queue: Siye Liu <[email protected]> Reviewed-by: Ian Clelland <[email protected]> Cr-Commit-Position: refs/heads/main@{#1374868} -- wpt-commits: aed1fc329b27fd8fa0db10a7d2640c45a3454ff4 wpt-pr: 48842
- Loading branch information
1 parent
8997017
commit 4f641ac
Showing
12 changed files
with
45 additions
and
10 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
2 changes: 1 addition & 1 deletion
2
...orm/tests/focus/support/activeelement-after-calling-window-focus-outer-different.sub.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
2 changes: 1 addition & 1 deletion
2
...platform/tests/focus/support/activeelement-after-calling-window-focus-outer-same.sub.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
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
2 changes: 1 addition & 1 deletion
2
...support/iframe-contentwindow-focus-with-different-site-intermediate-frame-middle.sub.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
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
2 changes: 1 addition & 1 deletion
2
...us/support/iframe-contentwindow-focus-with-same-as-top-intermediate-frame-middle.sub.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
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
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
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
24 changes: 24 additions & 0 deletions
24
...eatures/focus-without-user-activation-default-permissions-policy.tentative.https.sub.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,24 @@ | ||
<!DOCTYPE html> | ||
<title>Focus without user activation container policy test</title> | ||
|
||
<body> | ||
<script src=/resources/testharness.js></script> | ||
<script src=/resources/testharnessreport.js></script> | ||
<script src=/permissions-policy/resources/permissions-policy.js></script> | ||
<script> | ||
'use strict'; | ||
var same_origin_src = '/permissions-policy/experimental-features/resources/permissions-policy-focus-without-user-activation.html'; | ||
var cross_origin_src = 'https://{{domains[www]}}:{{ports[https][0]}}' + | ||
same_origin_src; | ||
const header = 'Default "focus-without-user-activation" permissions policy [self]'; | ||
async_test(t => { | ||
test_feature_availability( | ||
'focus-without-user-activation', t, same_origin_src, expect_feature_available_default); | ||
}, header + " allows same-origin iframes."); | ||
|
||
async_test(t => { | ||
test_feature_availability( | ||
'focus-without-user-activation', t, cross_origin_src, expect_feature_unavailable_default); | ||
}, header + " doesn't allow cross-origin iframes."); | ||
</script> | ||
</body> |
11 changes: 11 additions & 0 deletions
11
...icy/experimental-features/resources/permissions-policy-focus-without-user-activation.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,11 @@ | ||
<!doctype html> | ||
<script> | ||
'use strict'; | ||
function post_result(enabled) { | ||
parent.postMessage({ type: 'availability-result', enabled }, "*"); | ||
} | ||
|
||
window.onload = function () { | ||
post_result(document.featurePolicy.allowedFeatures().includes("focus-without-user-activation")); | ||
} | ||
</script> |