Closed Bug 2058769 Opened 3 months ago Closed 2 months ago

[wpt-sync] Sync PR 61589 - Add DownloadObserver to Semantic Embedder

Categories

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

task

Tracking

(firefox158 fixed)

RESOLVED FIXED
158 Branch
Tracking Status
firefox158 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Attachments

(1 file)

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

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

Ian Zhao <yinguang@google.com> wrote:

Add DownloadObserver to Semantic Embedder

This CL implements the DownloadObserver and on-demand downloading
for the Semantic Embedder API.

Key changes:

  1. Download Progress Observer: Connects the Blink CreateMonitor down
    through the AIManager Mojo interface to the
    AISemanticEmbedderServiceLauncher, allowing the web page to track
    component download progress.

  2. On-Demand Downloading: Removes the unconditional startup
    registration of the AI Embeddings Component. The component is now
    dynamically registered and downloaded on-demand only when a website
    explicitly calls SemanticEmbedder.create().

  3. Background Download Resumption: Introduces the
    prefs::kIsAIEmbeddingsDownloadEligible local state preference.
    Once a user initiates a download, this pref ensures the component
    is registered on subsequent browser startups, allowing the
    Component Update Service to automatically resume and finish the
    download in the background.

  4. Robust Error Handling: Updates the on-demand update callback to
    properly propagate update_client::Error codes. If a download
    fails, the error is caught and Javascript promises are immediately
    rejected, preventing hangs.

  5. WPT Timeout Fixes: Rewrites testCreateMonitorWithAbortAt in util.js
    to trigger based on event counts rather than brittle hardcoded mock
    byte values.

Bug: 428233906
Change-Id: I9bfe293f33a47263e7a534ce2bfc7fa4119bb936
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8092081
Reviewed-by: Jingyun Liu \<jingyun@google.com>
Reviewed-by: Noah Rose Ledesma \<noahrose@google.com>
Commit-Queue: Ian Zhao \<yinguang@google.com>
Reviewed-by: Mike Wasserman \<msw@chromium.org>
Reviewed-by: Fred Shih \<ffred@chromium.org>
Reviewed-by: Steven Holte \<holte@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1669825}

Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → INVALID
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
Attached file Notable wpt changes —

CI Results

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

Total 165 tests

Status Summary

Firefox

OK : 153[GitHub] 156[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
PASS : 1[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 2[Gecko-windows11-32-25h2-debug, Gecko-windows11-64-25h2-debug, GitHub] 3[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-opt]
FAIL : 389[Gecko-windows11-32-25h2-debug] 404[Gecko-windows11-64-25h2-debug] 407[GitHub] 418[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-opt]
PRECONDITION_FAILED: 1
TIMEOUT : 2[Gecko-windows11-32-25h2-debug] 3[Gecko-windows11-64-25h2-debug] 4[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-opt, GitHub]
ERROR : 6[Gecko-windows11-32-25h2-debug] 7[Gecko-windows11-64-25h2-debug] 8[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-opt, GitHub]
NOTRUN : 7[Gecko-windows11-32-25h2-debug] 11[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt, GitHub]

Safari

OK : 153
PASS : 2
FAIL : 407
PRECONDITION_FAILED: 1
TIMEOUT : 4
ERROR : 8
NOTRUN : 11

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

(See attachment for full changes)

Status: REOPENED → RESOLVED
Closed: 3 months ago → 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 158 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: