Files
tubestation/testing/web-platform/tests/client-hints/http-equiv-accept-ch-iframe.https.html
Victor Tan 579503944b Bug 1764967 [wpt PR 33656] - Migrate iframe-based Client Hint WPTs to import client hints lists, a=testonly
Automatic update from web-platform-tests
Migrate iframe-based Client Hint WPTs to import client hints lists

Introduce two new files into "client-hints/resources" to centralize the
dependencies of client hint token lists across javascript and python
tests:

  - export.js
  - clienthintslist.py

Eventually all Client Hints tests will be migrated to using these lists
to pare down the number of tests touched when creating new hints; this
CL pertains to the tests that depend on
"client-hints/resources/expect-client-hints-headers-iframe.py"

One of change is the query strings fed to
"expect-client-hints-headers-iframe.py" is now generated in
"client-hints/resources/feature-policy-navigation.js".

Another change is fixing tests related to `sec-ch-ua-platform` since we
added platform to client hints returned by default in
getHighEntropyValues in https://crrev.com/c/3389295.

Bug: 1304740
Change-Id: Id41ddbe1ee29c10f7b7c96a283f7eca2abec438b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3549556
Reviewed-by: Ali Beyad <abeyad@chromium.org>
Commit-Queue: Victor Tan <victortan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#993338}

--

wpt-commits: 0f27025f24489190e35227dd768fc439599a759b
wpt-pr: 33656
2022-05-15 20:20:51 +00:00

27 lines
996 B
HTML

<html>
<meta http-equiv="Accept-CH" content="Sec-CH-Device-Memory, Device-Memory, Sec-CH-DPR, DPR, Sec-CH-Viewport-Width, Viewport-Width">
<title>Accept-CH http-equiv iframe test</title>
<body>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/get-host-info.sub.js"></script>
<script src="/client-hints/resources/export.js"></script>
<script src="resources/feature-policy-navigation.js"></script>
<script>
(async () => {
await test_frame(
"HTTPS_ORIGIN",
expect_iframe_no_hints,
"",
"Client hints loaded on same-origin iframe should include hints with a default permissions policy of" +
"self and *, but the http-equiv meta tag has a bug and it doesn't impact iframes.");
await test_frame(
"HTTPS_REMOTE_ORIGIN",
expect_iframe_no_hints,
"",
"Client hints loaded on cross-origin iframe only include hints with a default permissions policy of *.");
})();
</script>
</body>
</html>