[wpt-sync] Sync PR 62722 - [Translator API WPTs] Fix test preconditions for downloadable models
Categories
(Testing :: web-platform-tests, task, P4)
Tracking
(firefox158 fixed)
| Tracking | Status | |
|---|---|---|
| firefox158 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 62722 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/62722
Details from upstream follow.
Isaac Ahouma <iahouma@google.com> wrote:
[Translator API WPTs] Fix test preconditions for downloadable models
Fixes Translator WPT failures on bots where the translation models are
'downloadable' rather than immediately 'available'
(https://ci.chromium.org/ui/p/chrome/builders/luci.chrome.ci/optimization_guide-mac-arm64).
- util.js: Allow createTranslator() to proceed if the model is
'downloadable', as the helper already provides the user activation
needed to trigger the download.- translator-create-user-activation: Make the test resilient to the
initial model availability state by only enforcing the user
activation rejection check if the model actually needs to be
downloaded. Also fixes premature consumption of transient user
activation that caused spurious NotAllowedError failures.Bug: 510552929
Change-Id: I1e779be32ac2a2a22cef77f55630fe423fd1edc1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8395053
Commit-Queue: Isaac Ahouma \<iahouma@google.com>
Reviewed-by: Paula Gómez \<paugomez@google.com>
Cr-Commit-Position: refs/heads/main@{#1696661}
| Assignee | ||
Comment 1•2 months ago
|
||
PR 62722 applied with additional changes from upstream: e03210d8366a4f330e19b4929023d1a2b5e1230c
| Assignee | ||
Comment 2•2 months ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/jobs?repo=try&landoInstance=lando-prod-2025&landoCommitID=92330
| Assignee | ||
Comment 3•2 months ago
|
||
CI Results
Ran 8 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 7 tests and 19 subtests
Status Summary
Firefox
OK : 6[Gecko-windows11-32-25h2-debug, GitHub] 7[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
FAIL : 11[Gecko-windows11-32-25h2-debug] 27[GitHub] 30[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
Chrome
OK : 1
PASS : 2
TIMEOUT: 10
NOTRUN : 20
Safari
OK : 6
FAIL : 27
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
- /ai/translator/translator-bad-input.https.window.html [wpt.fyi]
- Translator.create rejects with TypeError if no options are passed.:
FAIL - Translator.create rejects with TypeError targetLanguage is not provided.:
FAIL - Translator.create rejects with TypeError sourceLanguage is not provided.:
FAIL
- Translator.create rejects with TypeError if no options are passed.:
- /ai/translator/translator-create-user-activation.optional.https.window.html [wpt.fyi]
- Create requires user activation when availability is "downloadable":
FAIL(Chrome:TIMEOUT, Safari:FAIL)
- Create requires user activation when availability is "downloadable":
- /ai/translator/translator-locale.https.window.html [wpt.fyi]
- Translator.availability() is consistent between language tag variations:
FAIL(Chrome:PASS, Safari:FAIL) - Translator has valid source and target languages:
FAIL(Chrome:TIMEOUT, Safari:FAIL) - Translator.create() throws RangeError for invalid language tags:
FAIL(Chrome:NOTRUN, Safari:FAIL) - Translator.availability() throws RangeError for invalid language tags:
FAIL(Chrome:NOTRUN, Safari:FAIL)
- Translator.availability() is consistent between language tag variations:
- /ai/translator/translator-translate-post-abort.tentative.https.window.html [wpt.fyi]
- Translate after aborting a previous translate.:
FAIL(Chrome:TIMEOUT, Safari:FAIL)
- Translate after aborting a previous translate.:
- /ai/translator/translator-translate-streaming-post-abort.tentative.https.window.html [wpt.fyi]
- Translate after aborting a previous translateStreaming.:
FAIL(Chrome:TIMEOUT, Safari:FAIL)
- Translate after aborting a previous translateStreaming.:
- /ai/translator/translator.https.window.html [wpt.fyi]
- If monitor throws an error, LanguageDetector.create() rejects with that error:
FAIL(Chrome:PASS, Safari:FAIL)
- If monitor throws an error, LanguageDetector.create() rejects with that error:
- /ai/translator/translator.optional.https.window.html [wpt.fyi]:
OK[Gecko-android-em-14-x86_64-debug-geckoview,Gecko-android-em-14-x86_64-lite-opt-geckoview,Gecko-android-em-14-x86_64-opt-geckoview,Gecko-linux2404-64-debug,Gecko-linux2404-64-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt,GitHub],SKIP[Gecko-windows11-32-25h2-debug] (Chrome:TIMEOUT, Safari:OK)- Simple Translator.translate() call:
FAIL(Chrome:TIMEOUT, Safari:FAIL) - Simple Translator.translateStreaming() call:
FAIL(Chrome:NOTRUN, Safari:FAIL) - Multiple sentence Translator.translateStreaming() call:
FAIL(Chrome:NOTRUN, Safari:FAIL) - Multiple sentence Translator.translateStreaming() call with honorific:
FAIL(Chrome:NOTRUN, Safari:FAIL) - Translate Streaming API must continue even after GC has been performed.:
FAIL(Chrome:NOTRUN, Safari:FAIL) - Translator: sourceLanguage and targetLanguage are equal to their respective option passed in to Translator.create.:
FAIL(Chrome:NOTRUN, Safari:FAIL) - Translator.create() call with an aborted signal.:
FAIL(Chrome:NOTRUN, Safari:FAIL) - Aborting Translator.create().:
FAIL(Chrome:NOTRUN, Safari:FAIL) - Translator.translate() call with an aborted signal.:
FAIL(Chrome:NOTRUN, Safari:FAIL) - Aborting Translator.translate().:
FAIL(Chrome:NOTRUN, Safari:FAIL) - Calling Translator.destroy() aborts calls to write and measureInputUsage.:
FAIL(Chrome:NOTRUN, Safari:FAIL) - Translator.translateStreaming() fails after destroyed:
FAIL(Chrome:NOTRUN, Safari:FAIL) - Translator.create()'s abort signal destroys its Translator after creation.:
FAIL(Chrome:NOTRUN, Safari:FAIL) - Translator.create() notifies its monitor on downloadprogress:
FAIL(Chrome:NOTRUN, Safari:FAIL) - Progress events are not emitted after aborted.:
FAIL(Chrome:NOTRUN, Safari:FAIL) - Translator.translate() echoes non-translatable content:
FAIL(Chrome:NOTRUN, Safari:FAIL) - Translator.measureInputUsage() and inputQuota basic usage.:
FAIL(Chrome:NOTRUN, Safari:FAIL) - Translator.measureInputUsage() call with an aborted signal.:
FAIL(Chrome:NOTRUN, Safari:FAIL) - Aborting Translator.measureInputUsage().:
FAIL(Chrome:NOTRUN, Safari:FAIL)
- Simple Translator.translate() call:
Tests Disabled in Gecko Infrastructure
- /ai/translator/translator.optional.https.window.html [wpt.fyi]:
OK[Gecko-android-em-14-x86_64-debug-geckoview,Gecko-android-em-14-x86_64-lite-opt-geckoview,Gecko-android-em-14-x86_64-opt-geckoview,Gecko-linux2404-64-debug,Gecko-linux2404-64-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt,GitHub],SKIP[Gecko-windows11-32-25h2-debug] (Chrome:TIMEOUT, Safari:OK)
Comment 5•2 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/7c91bdeee67d
https://hg.mozilla.org/mozilla-central/rev/bf236b82a578
Description
•