Skip to content

Commit

Permalink
Bug 1622428 [wpt PR 22248] - [UA-CH] Add userAgentData worker support…
Browse files Browse the repository at this point in the history
…, 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
marco-c committed Mar 23, 2020
1 parent 571a6eb commit 0be8378
Show file tree
Hide file tree
Showing 4 changed files with 614 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,25 +39,6 @@
>
<
script
src
=
"
/
webrtc
/
dictionary
-
helper
.
js
"
>
<
/
script
>
<
script
>
test
(
Expand All @@ -74,6 +55,25 @@
navigator
)
;
assert_true
(
"
NavigatorUAData
"
in
window
)
;
assert_equals
(
typeof
self
.
NavigatorUAData
"
function
"
)
}
"
navigator
Expand Down
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
>
Loading

0 comments on commit 0be8378

Please sign in to comment.