Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Code-Review | +1 |
LGTM % a few minor suggestions
}, header + " dones't allow cross-origin iframes.");
```suggestion
}, header + " doesn't allow cross-origin iframes.");
```
var allow = getAllowAttribute(iframe, 'fullscreen');
I would expect a `get` API to retrieve the attribute, whereas this is just returning true/false. Would a name like `hasAttributeWithValue` be more appropriate?
if (!frame.hasAttribute('allow')) {
return false;
}
return frame.getAttribute('allow').includes(feature);
```suggestion
return frame.hasAttribute('allow') && frame.getAttribute('allow').includes(feature);
```
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
```suggestion
}, header + " doesn't allow cross-origin iframes.");
```
Done
var allow = getAllowAttribute(iframe, 'fullscreen');
I would expect a `get` API to retrieve the attribute, whereas this is just returning true/false. Would a name like `hasAttributeWithValue` be more appropriate?
Renamed to `hasAllowAttributeWithValue`.
if (!frame.hasAttribute('allow')) {
return false;
}
return frame.getAttribute('allow').includes(feature);
```suggestion
return frame.hasAttribute('allow') && frame.getAttribute('allow').includes(feature);
```
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
var allow = getAllowAttribute(iframe, 'fullscreen');
Siye LiuI would expect a `get` API to retrieve the attribute, whereas this is just returning true/false. Would a name like `hasAttributeWithValue` be more appropriate?
Renamed to `hasAllowAttributeWithValue`.
Done
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Code-Review | +1 |
This looks good, with one comment about the syntax used in the allow attributes
<iframe allow="focus-without-user-activation *" src="https://{{hosts[][www]}}:{{ports[https][0]}}/focus/support/activeelement-after-calling-window-focus-inner.html"></iframe>
The "*" shouldn't be necessary here unless you expect the framed content to redirect to a new origin. (Same comment for the other tests here)
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Commit-Queue | +1 |
<iframe allow="focus-without-user-activation *" src="https://{{hosts[][www]}}:{{ports[https][0]}}/focus/support/activeelement-after-calling-window-focus-inner.html"></iframe>
The "*" shouldn't be necessary here unless you expect the framed content to redirect to a new origin. (Same comment for the other tests here)
Acknowledged
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Exportable changes to web-platform-tests were detected in this CL and a pull request in the upstream repo has been made: https://github.com/web-platform-tests/wpt/pull/48842.
When this CL lands, the bot will automatically merge the PR on GitHub if the required GitHub checks pass; otherwise, ecosystem-infra@ team will triage the failures and may contact you.
WPT Export docs:
https://chromium.googlesource.com/chromium/src/+/main/docs/testing/web_platform_tests.md#Automatic-export-process
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
6 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: third_party/blink/web_tests/http/tests/feature-policy/web-share.html
Insertions: 2, Deletions: 2.
@@ -2,8 +2,8 @@
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="resources/helper.js"></script>
-<iframe allow="focus-without-user-activation *"></iframe>
-<iframe allow="web-share; focus-without-user-activation *"></iframe>
+<iframe allow="focus-without-user-activation"></iframe>
+<iframe allow="web-share; focus-without-user-activation;"></iframe>
<script>
var srcs = [
"resources/feature-policy-web-share.html",
```
```
The name of the file: third_party/blink/web_tests/http/tests/feature-policy/fullscreen-enabledforself.php
Insertions: 2, Deletions: 2.
@@ -14,8 +14,8 @@
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="resources/helper.js"></script>
-<iframe allow="focus-without-user-activation *"></iframe>
-<iframe allow="focus-without-user-activation *" allowfullscreen></iframe>
+<iframe allow="focus-without-user-activation"></iframe>
+<iframe allow="focus-without-user-activation" allowfullscreen></iframe>
<script>
var srcs = [
"resources/feature-policy-fullscreen.html",
```
```
The name of the file: third_party/blink/web_tests/external/wpt/focus/support/iframe-contentwindow-focus-with-different-site-intermediate-frame-middle.sub.html
Insertions: 1, Deletions: 1.
@@ -1,7 +1,7 @@
<!doctype html>
<meta charset="utf-8">
<title>iframe.contentWindow.focus() with different-site intermediate frame middle</title>
-<iframe allow="focus-without-user-activation *" src="http://{{hosts[][www]}}:{{ports[http][0]}}/focus/support/iframe-contentwindow-focus-with-different-site-intermediate-frame-inner.html"></iframe>
+<iframe allow="focus-without-user-activation" src="http://{{hosts[][www]}}:{{ports[http][0]}}/focus/support/iframe-contentwindow-focus-with-different-site-intermediate-frame-inner.html"></iframe>
<script>
let iframe = document.getElementsByTagName("iframe")[0];
let log = "";
```
```
The name of the file: third_party/blink/web_tests/external/wpt/focus/support/iframe-contentwindow-focus-with-same-as-top-intermediate-frame-outer.html
Insertions: 1, Deletions: 1.
@@ -19,4 +19,4 @@
}, 2000);
}
</script>
-<iframe allow="focus-without-user-activation *" src="iframe-contentwindow-focus-with-same-as-top-intermediate-frame-middle.sub.html"></iframe>
+<iframe allow="focus-without-user-activation" src="iframe-contentwindow-focus-with-same-as-top-intermediate-frame-middle.sub.html"></iframe>
```
```
The name of the file: third_party/blink/web_tests/external/wpt/focus/support/iframe-focus-with-different-site-intermediate-frame-outer.sub.html
Insertions: 1, Deletions: 1.
@@ -19,4 +19,4 @@
}, 3000);
}
</script>
-<iframe allow="focus-without-user-activation *" src="http://{{hosts[alt][www]}}:{{ports[http][0]}}/focus/support/iframe-focus-with-different-site-intermediate-frame-middle.sub.html"></iframe>
+<iframe allow="focus-without-user-activation" src="http://{{hosts[alt][www]}}:{{ports[http][0]}}/focus/support/iframe-focus-with-different-site-intermediate-frame-middle.sub.html"></iframe>
```
```
The name of the file: third_party/blink/web_tests/external/wpt/focus/support/activeelement-after-calling-window-focus-outer-same.sub.html
Insertions: 1, Deletions: 1.
@@ -1,7 +1,7 @@
<!doctype html>
<meta charset="utf-8">
<title>Focus test outer document</title>
-<iframe allow="focus-without-user-activation *" src="https://{{hosts[][www]}}:{{ports[https][0]}}/focus/support/activeelement-after-calling-window-focus-middle.sub.html"></iframe>
+<iframe allow="focus-without-user-activation" src="https://{{hosts[][www]}}:{{ports[https][0]}}/focus/support/activeelement-after-calling-window-focus-middle.sub.html"></iframe>
<script>
let outerlog = "outerlog:";
```
```
The name of the file: third_party/blink/web_tests/external/wpt/generic-sensor/generic-sensor-iframe-tests.sub.js
Insertions: 1, Deletions: 1.
@@ -96,7 +96,7 @@
// Create cross-origin iframe and a sensor inside it.
const iframe = document.createElement('iframe');
- iframe.allow = featurePolicies.join(';') + '; focus-without-user-activation *;';
+ iframe.allow = featurePolicies.join(';') + '; focus-without-user-activation;';
iframe.src =
'https://{{domains[www1]}}:{{ports[https][0]}}/generic-sensor/resources/iframe_sensor_handler.html';
const iframeLoadWatcher = new EventWatcher(t, iframe, 'load');
```
```
The name of the file: third_party/blink/web_tests/external/wpt/focus/support/activeelement-after-calling-window-focus-outer-different.sub.html
Insertions: 1, Deletions: 1.
@@ -1,7 +1,7 @@
<!doctype html>
<meta charset="utf-8">
<title>Focus test outer document</title>
-<iframe allow="focus-without-user-activation *" src="https://{{hosts[alt][www]}}:{{ports[https][0]}}/focus/support/activeelement-after-calling-window-focus-middle.sub.html"></iframe>
+<iframe allow="focus-without-user-activation" src="https://{{hosts[alt][www]}}:{{ports[https][0]}}/focus/support/activeelement-after-calling-window-focus-middle.sub.html"></iframe>
<script>
let outerlog = "outerlog:";
```
```
The name of the file: third_party/blink/web_tests/http/tests/feature-policy/web-share-use-count.html
Insertions: 2, Deletions: 2.
@@ -2,8 +2,8 @@
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="resources/helper.js"></script>
-<iframe allow="focus-without-user-activation *"></iframe>
-<iframe allow="web-share; focus-without-user-activation *"></iframe>
+<iframe allow="focus-without-user-activation;"></iframe>
+<iframe allow="web-share; focus-without-user-activation;"></iframe>
<script>
var srcs = [
"resources/feature-policy-web-share-use-count.html",
```
```
The name of the file: third_party/blink/web_tests/external/wpt/focus/support/iframe-contentwindow-focus-with-same-as-top-intermediate-frame-middle.sub.html
Insertions: 1, Deletions: 1.
@@ -1,7 +1,7 @@
<!doctype html>
<meta charset="utf-8">
<title>iframe.contentWindow.focus() with same-as-top intermediate frame middle</title>
-<iframe allow="focus-without-user-activation *" src="http://{{hosts[alt][www]}}:{{ports[http][0]}}/focus/support/iframe-contentwindow-focus-with-same-as-top-intermediate-frame-inner.html"></iframe>
+<iframe allow="focus-without-user-activation" src="http://{{hosts[alt][www]}}:{{ports[http][0]}}/focus/support/iframe-contentwindow-focus-with-same-as-top-intermediate-frame-inner.html"></iframe>
<script>
let iframe = document.getElementsByTagName("iframe")[0];
let log = "";
```
```
The name of the file: third_party/blink/web_tests/http/tests/feature-policy/fullscreen-enabledforall.php
Insertions: 2, Deletions: 2.
@@ -14,8 +14,8 @@
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="resources/helper.js"></script>
-<iframe allow="focus-without-user-activation *"></iframe>
-<iframe allow="focus-without-user-activation *" allowfullscreen></iframe>
+<iframe allow="focus-without-user-activation"></iframe>
+<iframe allow="focus-without-user-activation" allowfullscreen></iframe>
<script>
var srcs = [
"resources/feature-policy-fullscreen.html",
```
```
The name of the file: third_party/blink/web_tests/external/wpt/focus/support/activeelement-after-calling-window-focus-middle.sub.html
Insertions: 1, Deletions: 1.
@@ -2,7 +2,7 @@
<meta charset="utf-8">
<title>Focus test middle document</title>
<h1>Middle</h1><br>
-<iframe allow="focus-without-user-activation *" src="https://{{hosts[][www]}}:{{ports[https][0]}}/focus/support/activeelement-after-calling-window-focus-inner.html"></iframe>
+<iframe allow="focus-without-user-activation" src="https://{{hosts[][www]}}:{{ports[https][0]}}/focus/support/activeelement-after-calling-window-focus-inner.html"></iframe>
<script>
let middlelog = "middlelog:";
```
```
The name of the file: third_party/blink/web_tests/external/wpt/focus/support/activeelement-after-focusing-different-site-iframe-outer-contentwindow.sub.html
Insertions: 1, Deletions: 1.
@@ -26,4 +26,4 @@
}, 1500);
}
</script>
-<iframe allow="focus-without-user-activation *" src="http://{{hosts[alt][www]}}:{{ports[http][0]}}/focus/support/activeelement-after-focusing-different-site-iframe-inner-contentwindow.html"></iframe>
+<iframe allow="focus-without-user-activation" src="http://{{hosts[alt][www]}}:{{ports[http][0]}}/focus/support/activeelement-after-focusing-different-site-iframe-inner-contentwindow.html"></iframe>
```
```
The name of the file: third_party/blink/web_tests/external/wpt/focus/support/iframe-contentwindow-focus-with-different-site-intermediate-frame-outer.sub.html
Insertions: 1, Deletions: 1.
@@ -19,4 +19,4 @@
}, 3000);
}
</script>
-<iframe allow="focus-without-user-activation *" src="http://{{hosts[alt][www]}}:{{ports[http][0]}}/focus/support/iframe-contentwindow-focus-with-different-site-intermediate-frame-middle.sub.html"></iframe>
+<iframe allow="focus-without-user-activation" src="http://{{hosts[alt][www]}}:{{ports[http][0]}}/focus/support/iframe-contentwindow-focus-with-different-site-intermediate-frame-middle.sub.html"></iframe>
```
[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]: https://github.com/w3c/webappsec-permissions-policy/issues/273#issuecomment-2384287101
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
The WPT PR for this CL has been merged upstream! https://github.com/web-platform-tests/wpt/pull/48842
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |