Closed Bug 2079799 Opened 1 month ago Closed 1 month ago

[wpt-sync] Sync PR 63385 - Decisions API: Require user activation to download the model

Categories

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

task

Tracking

(firefox160 fixed)

RESOLVED FIXED
160 Branch
Tracking Status
firefox160 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Jaewon Lee <jaeone@google.com> wrote:

Decisions API: Require user activation to download the model

DecisionModel.create() only rejected an unavailable model, so once a
backend reports "downloadable", any page could start a multi-GB model
download without a user gesture. Like LanguageModel, SemanticEmbedder
and the other built-in AI APIs, create() now rejects with
NotAllowedError when availability is "downloadable" and the window has
no user activation (sticky activation is enough, as for the other
APIs). Workers skip the check, as they do for the other APIs.

Adds a WPT like the other *-create-user-activation tests.

Bug: 565849508, 568193538
Change-Id: I9591845408f6e27c5f8c0e058cc8118ee1554bfc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8527785
Reviewed-by: Mike Wasserman \<msw@chromium.org>
Commit-Queue: Jaewon Lee \<jaeone@google.com>
Cr-Commit-Position: refs/heads/main@{#1714119}

Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]

CI Results

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

Total 1 tests and 1 subtests

Status Summary

Firefox

OK : 1
FAIL: 1

Chrome

OK : 1
FAIL: 1

Safari

OK : 1
FAIL: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 160 Branch
You need to log in before you can comment on or make changes to this bug.