tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 225fdb63f92c2aaf4d3614f34f66b1c934328245
parent 5eda13b23b4effcc3ae543c2e27ce0a6fa432611
Author: Jonathan Lee <jonathan-j-lee@users.noreply.github.com>
Date:   Wed,  3 Dec 2025 14:41:26 +0000

Bug 2003309 [wpt PR 56371] - Reland "[WPT] Add tests for User Agent Data on Fuchsia", a=testonly

Automatic update from web-platform-tests
Reland "[WPT] Add tests for User Agent Data on Fuchsia" (#56371)

Remove name of deleted test file from meta file to fix presubmit.
This is a reland of commit b3492005991e13a306f9f9b2593a9c3ff8e4b473

Original change's description:
> [WPT] Add tests for User Agent Data on Fuchsia
>
> CL 7114402 updated Chrome on Fuchsia to report platform version as an
> empty string, and introduced a Chromium-internal unit test. This CL
> adjusts (public) WPT test accordingly.
>
> Change-Id: I4e61b504b260e5aa9c0880d07f94fa1a73caa010
> Bug: 40204433
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7185126
> Commit-Queue: David Song <wintermelons@google.com>
> Reviewed-by: Mike Taylor <miketaylr@chromium.org>
> Reviewed-by: David Song <wintermelons@google.com>
> Cr-Commit-Position: refs/heads/main@{#1549975}

Bug: 40204433
Change-Id: Iab2f0a55846aacf2eea7613e888a506860bcc5ab
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7207666
Reviewed-by: Andrew Williams <awillia@chromium.org>
Reviewed-by: Mike Taylor <miketaylr@chromium.org>
Commit-Queue: Mike Taylor <miketaylr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1550694}

Co-authored-by: Anton Bershanskyi <bershanskyi@gmail.com>
--

wpt-commits: e55569aae1ca2ffecd61a7546e151898b21e1dde
wpt-pr: 56371

Diffstat:
Mtesting/web-platform/tests/ua-client-hints/useragentdata.https.any.js | 4++--
Mtesting/web-platform/tests/workers/WEB_FEATURES.yml | 1-
Mtesting/web-platform/tests/workers/WorkerNavigator_userAgentData.https.html | 17+++++++++++++++++
Dtesting/web-platform/tests/workers/WorkerNavigator_userAgentData.https.tentative.html | 22----------------------
4 files changed, 19 insertions(+), 25 deletions(-)

diff --git a/testing/web-platform/tests/ua-client-hints/useragentdata.https.any.js b/testing/web-platform/tests/ua-client-hints/useragentdata.https.any.js @@ -62,10 +62,10 @@ promise_test(() => { promise_test(() => { return navigator.userAgentData.getHighEntropyValues(["platformVersion", "wow64"]).then( hints => { - if (navigator.userAgentData.platform === "Linux") { + if (["Fuchsia", "Linux"].includes(navigator.userAgentData.platform)) { assert_true(hints.platformVersion === ""); assert_equals(hints.wow64, false); } } ); -}, "Platform version and wow64-ness on Linux should be fixed values"); +}, "Platform version and wow64-ness on Fuchsia and Linux should be fixed values"); diff --git a/testing/web-platform/tests/workers/WEB_FEATURES.yml b/testing/web-platform/tests/workers/WEB_FEATURES.yml @@ -12,7 +12,6 @@ features: files: - WorkerNavigator_userAgentData.http.html - WorkerNavigator_userAgentData.https.html - - WorkerNavigator_userAgentData.https.tentative.html - name: postmessage files: - Worker-postMessage-happens-in-parallel.https.html diff --git a/testing/web-platform/tests/workers/WorkerNavigator_userAgentData.https.html b/testing/web-platform/tests/workers/WorkerNavigator_userAgentData.https.html @@ -45,4 +45,21 @@ // Architecture should be one of two permitted values. assert_true(["x86", "arm"].some(arch => arch == e.data.architecture)) }, "Test that userAgentData is available in workers in secure contexts"); + + promise_test(async () => { + const e = await new Promise((resolve) => { + const worker = new Worker("./support/WorkerNavigator.js"); + worker.onmessage = resolve; + }); + const highEntropyValues = await navigator.userAgentData.getHighEntropyValues([ + "platformVersion", "wow64" + ]); + + if (["Fuchsia", "Linux"].includes(navigator.userAgentData.platform)) { + assert_true(e.data.platformVersion === ""); + assert_equals(e.data.wow64, false); + assert_true(highEntropyValues.platformVersion === ""); + assert_equals(highEntropyValues.wow64, false); + } + }, "Platform version and wow64-ness on Linux and Fuchsia should contain fixed values"); </script> diff --git a/testing/web-platform/tests/workers/WorkerNavigator_userAgentData.https.tentative.html b/testing/web-platform/tests/workers/WorkerNavigator_userAgentData.https.tentative.html @@ -1,22 +0,0 @@ -<!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) => { - const worker = new Worker("./support/WorkerNavigator.js"); - worker.onmessage = resolve; - }); - const highEntropyValues = await navigator.userAgentData.getHighEntropyValues([ - "platformVersion", "wow64" - ]); - - if (navigator.userAgentData.platform === "Linux") { - assert_true(e.data.platformVersion === ""); - assert_equals(e.data.wow64, false); - assert_true(highEntropyValues.platformVersion === ""); - assert_equals(highEntropyValues.wow64, false); - } - }, "Platform version and wow64-ness on Linux should contain fixed values"); -</script>