forked from web-platform-tests/wpt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Sec-CH-UA tests: fix existing tests, and test brand size.
As of WICG/ua-client-hints#179, https://wicg.github.io/ua-client-hints/#user-agent-brand now requires that a brand in a brand list not be longer than 32 bytes. This CL adds a new test for the userAgentData.brands interface, and modifies the existing sec-ch-ua HTTP tests. Also, the existing sec-ch-ua HTTP tests were updated to more closely reflect the current state of UA-CH ("UA" is not a valid token, and "Accept-CH-Lifetime" is not shipping). Bug: 1263180 Change-Id: Ifa7cbf18d67271e2dd1dc1d485f432d4ca9327fa Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3243544 Commit-Queue: Aaron Tagliaboschi <[email protected]> Auto-Submit: Mike Taylor <[email protected]> Reviewed-by: Aaron Tagliaboschi <[email protected]> Cr-Commit-Position: refs/heads/main@{#935138}
- Loading branch information
1 parent
f9310df
commit eda4940
Showing
3 changed files
with
38 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// META: title=tests for navigator.userAgentData | ||
|
||
test(t => { | ||
const brands = navigator.userAgentData.brands; | ||
assert_true(brands.every(brand => brand.brand.length < 32), | ||
"No brand should be longer than 32 characters."); | ||
}); |