Closed Bug 2036720 Opened 13 days ago Closed 9 days ago

[wpt-sync] Sync PR 59599 - WebMCP: 2/N Permissions policy and cross-origin iframe tool support

Categories

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

task

Tracking

(firefox152 fixed)

RESOLVED FIXED
152 Branch
Tracking Status
firefox152 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Dominic Farolino <dom@chromium.org> wrote:

WebMCP: 2/N Permissions policy and cross-origin iframe tool support

This CL implements ModelContext's getTools() method, and integrates it
with the permission policy work from https://crrev.com/c/7764073. The
list of tools that the getTools() Promise resolves to is dictated by
the exposedTo origins array for each tool in the tree. See 1 for
more information. This involves a new IPC on LocalFrameHost:
GetScriptTools() which returns an appropriately filtered list of tools
suitable for the caller.

Additionally, this CL adds a TON of tests. This CL does not include
tests for the declarative API, those will come in a follow-up CL, to
avoid bloating this one too much.

Follow-up CLs will:

  • Remove ModelContextTesting::listTools() and update each test to
    use getTools() instead.
  • Implement cross-origin iframe tool execution.
    • This will involve exposing WindowProxy and origin on the
      RegisteredTool dictionary, which this CL avoids for now.

R=mfoltz

Bug: 506393880,489045948
Change-Id: I8af48097f48aa38e3d1b885e4c6910157c82d854
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7800264
Commit-Queue: Dominic Farolino \<dom@chromium.org>
Reviewed-by: Mark Foltz \<mfoltz@chromium.org>
Reviewed-by: Alex Moshchuk \<alexmos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1624230}

PR 59599 applied with additional changes from upstream: cc0733058f91a94a68bb439e259baea1615c2e76

CI Results

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

Total 19 tests and 1 subtests

Status Summary

Firefox

OK : 9[GitHub] 17[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-32-25h2-debug, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
PASS : 6
FAIL : 20[GitHub] 27[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-32-25h2-debug, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
TIMEOUT: 3[Gecko-windows11-32-25h2-debug, Gecko-windows11-64-25h2-debug] 4[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-opt, GitHub]

Chrome

OK : 7
PASS : 2
FAIL : 7
TIMEOUT: 8
NOTRUN : 9

Safari

OK : 9
FAIL : 20
TIMEOUT: 4

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

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