Closed Bug 2016828 Opened 4 days ago Closed 33 minutes ago

[wpt-sync] Sync PR 57790 - Blink>AI: guard LanguageDetector detect after destroy

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(firefox149 fixed)

RESOLVED FIXED
149 Branch
Tracking Status
firefox149 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 57790 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/57790
Details from upstream follow.

Zhuoran Chen <blackfrog638@gmail.com> wrote:

Blink>AI: guard LanguageDetector detect after destroy

Ensure detect() checks session destruction before abort handling
so it throws InvalidStateError instead of dereferencing a null
model. Export LanguageDetector for unit tests and add the
language_detection core dep to link tests. Add a unit test that
exercises detect() after destroy().

Bug: 483762287
Change-Id: I223abc975bb90cba2cf3e1bd86ef52224a617e06
Tests: blink_unittests --gtest_filter=LanguageDetectorTest.DetectAfterDestroyThrows
Reviewed-on: https://chromium-review.googlesource.com/7570308
WPT-Export-Revision: ddef6f38f20ca7912c01bf0e3050ef2da72c8cad

CI Results

Ran 0 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 1 tests and 17 subtests

Status Summary

Firefox

PASS : 1
FAIL : 15
TIMEOUT: 1
ERROR : 1

Chrome

TIMEOUT: 2
NOTRUN : 16

Safari

PASS : 1
FAIL : 15
TIMEOUT: 1
ERROR : 1

Links

GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

  • /ai/language_detection/detector.https.window.html [wpt.fyi]: ERROR (Chrome: TIMEOUT, Safari: ERROR)
    • Create requires sticky user activation when availability is "downloadable": FAIL (Chrome: TIMEOUT, Safari: FAIL)
    • LanguageDetector.detect() returns valid results: FAIL (Chrome: NOTRUN, Safari: FAIL)
    • If monitor throws an error, LanguageDetector.create() rejects with that error: FAIL (Chrome: NOTRUN, Safari: FAIL)
    • LanguageDetector.create() call with an aborted signal.: FAIL (Chrome: NOTRUN, Safari: FAIL)
    • Aborting createLanguageDetector().: FAIL (Chrome: NOTRUN, Safari: FAIL)
    • Calling LanguageDetector.destroy() aborts calls to detect and measureInputUsage.: FAIL (Chrome: NOTRUN, Safari: FAIL)
    • LanguageDetector.detect() throws after destroy.: FAIL (Chrome: NOTRUN, Safari: FAIL)
    • LanguageDetector.create()'s abort signal destroys its LanguageDetector after creation.: FAIL (Chrome: NOTRUN, Safari: FAIL)
    • LanguageDetector.detect() call with an aborted signal.: FAIL (Chrome: NOTRUN, Safari: FAIL)
    • Aborting LanguageDetector.detect().: FAIL (Chrome: NOTRUN, Safari: FAIL)
    • LanguageDetector.measureInputUsage() and inputQuota basic usage.: FAIL (Chrome: NOTRUN, Safari: FAIL)
    • LanguageDetector.measureInputUsage() call with an aborted signal.: FAIL (Chrome: NOTRUN, Safari: FAIL)
    • Aborting LanguageDetector.measureInputUsage().: FAIL (Chrome: NOTRUN, Safari: FAIL)
    • Creating LanguageDetector with empty expectedInputLanguages array: FAIL (Chrome: NOTRUN, Safari: FAIL)
    • Creating LanguageDetector without expectedInputLanguages: FAIL (Chrome: NOTRUN, Safari: FAIL)
    • Progress events are not emitted after aborted.: TIMEOUT (Chrome: NOTRUN, Safari: TIMEOUT)
Status: NEW → RESOLVED
Closed: 33 minutes ago
Resolution: --- → FIXED
Target Milestone: --- → 149 Branch
You need to log in before you can comment on or make changes to this bug.