-
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.
Bug 1622428 [wpt PR 22248] - [UA-CH] Add userAgentData worker support…
…, a=testonly Automatic update from web-platform-tests [UA-CH] Add userAgentData worker support This implements PR #80 [1] and exposes userAgentData in workers. [1] WICG/ua-client-hints#80 Bug: 1062192 Change-Id: I1de6067ab6c00855d7bf820e9646eb4e5a8c5fdb Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2093220 Commit-Queue: Yoav Weiss <yoavweisschromium.org> Reviewed-by: Hiroki Nakagawa <nhirokichromium.org> Reviewed-by: Kinuko Yasuda <kinukochromium.org> Reviewed-by: Matt Falkenhagen <falkenchromium.org> Cr-Commit-Position: refs/heads/master{#751295} -- wpt-commits: 7a23db2a7457ed7ba96ea34ad3ec7016d0e8fe11 wpt-pr: 22248 UltraBlame original commit: 55b18a468398700bafe55b2dbff3bf4a104e6397
- Loading branch information
Showing
4 changed files
with
614 additions
and
20 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
152 changes: 152 additions & 0 deletions
152
testing/web-platform/tests/workers/WorkerNavigator_userAgentData.http.html
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,152 @@ | ||
< | ||
! | ||
DOCTYPE | ||
html | ||
> | ||
< | ||
title | ||
> | ||
WorkerNavigator | ||
. | ||
userAgentData | ||
< | ||
/ | ||
title | ||
> | ||
< | ||
script | ||
src | ||
= | ||
" | ||
/ | ||
resources | ||
/ | ||
testharness | ||
. | ||
js | ||
" | ||
> | ||
< | ||
/ | ||
script | ||
> | ||
< | ||
script | ||
src | ||
= | ||
" | ||
/ | ||
resources | ||
/ | ||
testharnessreport | ||
. | ||
js | ||
" | ||
> | ||
< | ||
/ | ||
script | ||
> | ||
< | ||
script | ||
> | ||
promise_test | ||
( | ||
async | ||
( | ||
) | ||
= | ||
> | ||
{ | ||
const | ||
e | ||
= | ||
await | ||
new | ||
Promise | ||
( | ||
( | ||
resolve | ||
reject | ||
) | ||
= | ||
> | ||
{ | ||
const | ||
worker | ||
= | ||
new | ||
Worker | ||
( | ||
" | ||
. | ||
/ | ||
support | ||
/ | ||
WorkerNavigator | ||
. | ||
js | ||
" | ||
) | ||
; | ||
worker | ||
. | ||
onmessage | ||
= | ||
resolve | ||
; | ||
} | ||
) | ||
; | ||
assert_equals | ||
( | ||
e | ||
. | ||
data | ||
. | ||
uaList | ||
undefined | ||
) | ||
; | ||
assert_equals | ||
( | ||
e | ||
. | ||
data | ||
. | ||
mobile | ||
undefined | ||
) | ||
; | ||
assert_equals | ||
( | ||
e | ||
. | ||
data | ||
. | ||
getHighEntropyValues | ||
undefined | ||
) | ||
; | ||
} | ||
" | ||
Test | ||
that | ||
userAgentData | ||
is | ||
not | ||
available | ||
in | ||
workers | ||
in | ||
non | ||
- | ||
secure | ||
contexts | ||
" | ||
) | ||
; | ||
< | ||
/ | ||
script | ||
> |
Oops, something went wrong.