mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-26 20:30:41 +00:00
Bug 1599450 [wpt PR 20450] - [client hints] Remove explicit lifetimes behind FeaturePolicyForClientHints flag, a=testonly
Automatic update from web-platform-tests
[client hints] Remove explicit lifetimes behind FeaturePolicyForClientHints flag
Adding changes to client hint lifetimes <7d24ea40f0
>
under the client hint feature policy flag.
Bug: 1017166
Change-Id: Ia4d63777c4a4fcb150d4e854312851105fa0a11b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1919953
Reviewed-by: Yoav Weiss <yoavweiss@chromium.org>
Commit-Queue: Aaron Tagliaboschi <aarontag@chromium.org>
Cr-Commit-Position: refs/heads/master@{#719162}
--
wpt-commits: 0b93a71f27ef7801ff69d787097b49c4e8ec5c40
wpt-pr: 20450
This commit is contained in:
parent
3d4819464d
commit
cc84d62c25
@ -12,16 +12,14 @@ in this web page, and two in the other web pages.
|
||||
<script>
|
||||
|
||||
// This test fetches resources/accept_ch.html. The response headers to
|
||||
// that webpage contains only the Accept-CH header. Due to the missing
|
||||
// Accept-CH-Lifetime header, the user-agent should not persist origin
|
||||
// preferences for the client hints specified in Accept-CH header.
|
||||
// that webpage contains only the Accept-CH header. These preferences should be
|
||||
// stored so that the next request to the same origin is sent with the
|
||||
// requested client hint headers.
|
||||
|
||||
// Next, to verify that the origin preferences were not persisted by the user
|
||||
// agent, this test fetches resources/do_not_expect_client_hints_headers.html
|
||||
// in a new window. Fetching of
|
||||
// resources/do_not_expect_client_hints_headers.html
|
||||
// verifies that the user agent does not send the client hints in the request
|
||||
// headers.
|
||||
// Next, to verify that the origin preferences were persisted by the user
|
||||
// agent, this test fetches resources/expect_client_hints_headers.html in a new
|
||||
// window. Fetching of resources/expect_client_hints_headers.html verifies that
|
||||
// the user agent does send the client hints in the request headers.
|
||||
|
||||
// Test is marked as tentative until https://github.com/whatwg/fetch/issues/726
|
||||
// is resolved.
|
||||
@ -39,7 +37,7 @@ promise_test(t => {
|
||||
|
||||
async_test(t => {
|
||||
window.addEventListener('message', t.step_func(function(e) {
|
||||
if(!e.source.location.pathname.includes("do_not_expect_client_hints_headers.html")) {
|
||||
if(!e.source.location.pathname.includes("expect_client_hints_headers.html")) {
|
||||
return;
|
||||
}
|
||||
if(typeof e.data != "string")
|
||||
@ -47,12 +45,12 @@ async_test(t => {
|
||||
assert_equals(e.data, "PASS");
|
||||
t.done();
|
||||
}));
|
||||
}, "Loading of resources/do_not_expect_client_hints_headers.html did not finish.");
|
||||
}, "Loading of resources/expect_client_hints_headers.html did not finish.");
|
||||
|
||||
function acceptChLoaded() {
|
||||
// Open a new window. Verify that the user agent does not attach the client
|
||||
// hints.
|
||||
var verify_win = window.open("resources/do_not_expect_client_hints_headers.html");
|
||||
var verify_win = window.open("resources/expect_client_hints_headers.html");
|
||||
assert_not_equals(verify_win, null, "Popup windows not allowed?");
|
||||
}
|
||||
|
||||
|
@ -12,16 +12,15 @@
|
||||
|
||||
<script>
|
||||
|
||||
// This test contains accept-ch http-equiv header. Due to the missing
|
||||
// Accept-CH-Lifetime header, the user-agent should not persist origin
|
||||
// preferences for the client hints specified in Accept-CH header.
|
||||
// This test contains accept-ch http-equiv header. The user-agent should
|
||||
// persist origin preferences for the client hints specified in Accept-CH
|
||||
// header.
|
||||
|
||||
// Next, to verify that the origin preferences were not persisted by the user
|
||||
// Next, to verify that the origin preferences were persisted by the user
|
||||
// agent, this test fetches resources/do_not_expect_client_hints_headers.html
|
||||
// in a new window. Fetching of
|
||||
// resources/do_not_expect_client_hints_headers.html
|
||||
// verifies that the user agent does not send the client hints in the request
|
||||
// headers.
|
||||
// resources/do_not_expect_client_hints_headers.html verifies that the user
|
||||
// agent does not send the client hints in the request headers.
|
||||
|
||||
// Test is marked as tentative until https://github.com/whatwg/fetch/issues/726
|
||||
// is resolved.
|
||||
@ -37,12 +36,12 @@ promise_test(t => {
|
||||
// Verify that the browser does not attach client hints on resources in a
|
||||
// different navigation. This verifies that the client hint preferences were
|
||||
// not persisted for the origin.
|
||||
window.open("resources/do_not_expect_client_hints_headers.html");
|
||||
window.open("resources/expect_client_hints_headers.html");
|
||||
async_test(t => {
|
||||
window.addEventListener('message', t.step_func_done(e => {
|
||||
assert_equals(e.data, 'PASS');
|
||||
}));
|
||||
}, "Loading of resources/do_not_expect_client_hints_headers.html did not finish.");
|
||||
}, "Loading of resources/expect_client_hints_headers.html did not finish.");
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
Loading…
x
Reference in New Issue
Block a user