Commit e33b9c4b authored by Tarun Bansal's avatar Tarun Bansal Committed by Commit Bot

Add web platform test for malformed client hints header

Bug: 817049
Change-Id: I06eba99526dfd5b0a3f7fdc8fca60355abf93326
Reviewed-on: https://chromium-review.googlesource.com/1035914Reviewed-by: default avatarRobert Ma <robertma@chromium.org>
Commit-Queue: Tarun Bansal <tbansal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#554860}
parent aba4a831
<html>
<body>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
promise_test(t => {
return fetch("/client-hints/echo_client_hints_received.py").then(r => {
assert_equals(r.status, 200)
// Verify that the browser does not include client hints in the headers
// since Accept-CH is malformed (includes whitespace between attributes
// instead of comma).
assert_false(r.headers.has("device-memory-received"), "device-memory-received");
assert_false(r.headers.has("dpr-received"), "dpr-received");
assert_false(r.headers.has("viewport-width-received"), "viewport-width-received");
});
}, "Accept-CH header test");
</script>
</body>
</html>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment