blob: d217a16509eedac1a861956859c1527bf3baebc1 [file] [log] [blame] [edit]
<html>
<body>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/get-host-info.sub.js"></script>
<script src="resources/feature-policy-navigation.js"></script>
<script>
(async () => {
await test_frame(
"HTTPS_REMOTE_ORIGIN",
"device-memory=true&dpr=false&viewport-width=false&sec-ch-ua=false&sec-ch-ua-mobile=false",
"",
"Client hints loaded on cross-origin iframe request with feature policy.");
await test_frame(
"HTTPS_ORIGIN",
"device-memory=true&dpr=false&viewport-width=true&sec-ch-ua=true&sec-ch-ua-mobile=false",
"",
"Client hints loaded on same-origin iframe request with feature policy.");
await test_frame(
"HTTPS_REMOTE_ORIGIN",
"",
"",
"Iframe trying to set Accept-CH-Lifetime.", "/client-hints/resources/iframe-accept-ch-lifetime.html");
await test_frame(
"HTTPS_REMOTE_ORIGIN",
"device-memory=true&dpr=false&viewport-width=false&sec-ch-ua=false&sec-ch-ua-mobile=false",
"",
"Client hints loaded on cross-origin iframe request with feature policy after attempting to set independently.");
})();
</script>
</body>
</html>