Closed Bug 2051409 Opened 2 months ago Closed 2 months ago

[wpt-sync] Sync PR 60974 - [WebMCP] Make registerTool() return a promise

Categories

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

task

Tracking

(firefox154 fixed)

RESOLVED FIXED
154 Branch
Tracking Status
firefox154 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

François Beaufort <beaufort.francois@gmail.com> wrote:

[WebMCP] Make registerTool() return a promise

Spec issue: https://github.com/webmachinelearning/webmcp/issues/175

Bug: 489045948
Change-Id: I254250d12ad78b95626939e0f7e22fd6fe56f70f
Reviewed-on: https://chromium-review.googlesource.com/7916507
WPT-Export-Revision: 44558e16edf61d44b081adcda67c961d98ba381f

CI Results

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

Total 34 tests and 1 subtests

Status Summary

Firefox

OK : 26[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-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
PASS : 2
FAIL : 62[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-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] 63[GitHub]
TIMEOUT: 6
ERROR : 1
NOTRUN : 1

Chrome

OK : 29
PASS : 44
FAIL : 23

Safari

OK : 26
FAIL : 63
TIMEOUT: 6
NOTRUN : 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

  • /webmcp/imperative/exposedTo-cross-origin-child.https.html [wpt.fyi]: SKIP [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-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt], TIMEOUT [GitHub] (Chrome: OK, Safari: TIMEOUT)
    • Parent exposes tool to cross-origin child: FAIL (Chrome: PASS, Safari: FAIL)
    • Cross-origin child exposes tool to parent: FAIL (Chrome: PASS, Safari: FAIL)
    • Parent exposes tool to origin that is neither its own nor its iframe's: FAIL (Chrome: PASS, Safari: FAIL)
    • Iframe exposes tool to origin that is neither its own nor its parent's: FAIL (Chrome: PASS, Safari: FAIL)
    • Cross-origin iframe without permissions policy does not receive toolchange event even if exposed to it: TIMEOUT (Chrome: PASS, Safari: TIMEOUT)
  • /webmcp/imperative/exposedTo-multiple-children.https.html [wpt.fyi]: SKIP [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-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt], TIMEOUT [GitHub] (Chrome: OK, Safari: TIMEOUT)
    • Multi-origin setup with mixed exposure lists: TIMEOUT (Chrome: PASS, Safari: TIMEOUT)
  • /webmcp/imperative/permissions-policy.https.html [wpt.fyi]: SKIP [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-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt], TIMEOUT [GitHub] (Chrome: OK, Safari: TIMEOUT)
    • registerTool() rejects in iframe, after navigation to an origin not covered by permissions policy: FAIL (Chrome: PASS, Safari: FAIL)
    • getTools() throws NotAllowedError in iframe when permissions policy is disabled: TIMEOUT (Chrome: PASS, Safari: TIMEOUT)
    • executeTool() throws NotAllowedError in iframe when permissions policy is disabled: NOTRUN (Chrome: PASS, Safari: NOTRUN)
  • /webmcp/imperative/detached-frame-executeTool.https.html [wpt.fyi]: ERROR
    • executeTool() throws InvalidStateError in detached frame: FAIL
  • /webmcp/imperative/detached-frame-getTools.https.html [wpt.fyi]
    • getTools() throws InvalidStateError in detached frame: FAIL
  • /webmcp/imperative/detached-frame-registerTool.https.html [wpt.fyi]
    • Regardless of whether Navigator's modelContext object has been allocatedits getter always returns null after the document has been detached: FAIL (Chrome: PASS, Safari: FAIL)
    • registerTool() rejects InvalidStateError in detached frame: FAIL (Chrome: FAIL, Safari: FAIL)
  • /webmcp/imperative/document-domain-enabled.https.html [wpt.fyi]
    • modelContext.registerTool rejects with SecurityError when document.domain is enabled: FAIL (Chrome: FAIL, Safari: FAIL)
    • modelContext.getTools rejects with SecurityError when document.domain is enabled: FAIL (Chrome: PASS, Safari: FAIL)
    • modelContext.executeTool rejects with SecurityError when document.domain is enabled: FAIL (Chrome: PASS, Safari: FAIL)
  • /webmcp/imperative/duplicate_tool_registration.https.html [wpt.fyi]
    • duplicate tool registration is invalid.: FAIL (Chrome: FAIL, Safari: FAIL)
  • /webmcp/imperative/executeTool-abort.https.html [wpt.fyi]
    • executeTool() rejects with AbortError when signal is aborted: FAIL (Chrome: PASS, Safari: FAIL)
  • /webmcp/imperative/executeTool-across-trees.https.html [wpt.fyi]
    • executeTool() rejects when the tool is hosted in another frame tree: FAIL (Chrome: PASS, Safari: FAIL)
  • /webmcp/imperative/executeTool-caller-navigate-abort.https.html [wpt.fyi]
    • executeTool() aborts target signal when the invoker document (same-origin) navigates away: FAIL (Chrome: FAIL, Safari: FAIL)
    • executeTool() aborts target signal when the invoker document (cross-origin) navigates away: FAIL (Chrome: FAIL, Safari: FAIL)
  • /webmcp/imperative/executeTool-invalid-dictionary.https.html [wpt.fyi]
    • executeTool() rejects with TypeError when the required 'origin' dictionary member is omitted: FAIL (Chrome: PASS, Safari: FAIL)
  • /webmcp/imperative/executeTool-target-detachment.https.html [wpt.fyi]
    • executeTool() rejects when target frame is detached before execution: FAIL (Chrome: PASS, Safari: FAIL)
    • executeTool() rejects when target frame is detached mid-execution: FAIL (Chrome: PASS, Safari: FAIL)
  • /webmcp/imperative/executeTool-target-navigation.https.html [wpt.fyi]
    • executeTool() rejects when target document navigates away: FAIL (Chrome: PASS, Safari: FAIL)
  • /webmcp/imperative/executeTool-unauthorized-origin.https.html [wpt.fyi]
    • executeTool() rejects when parent frame attempts unauthorized execution of cross-origin iframe tool: FAIL (Chrome: PASS, Safari: FAIL)
  • /webmcp/imperative/exposedTo-defaults-cross-origin.https.html [wpt.fyi]
    • Parent tool with no exposedTo array is not visible to cross-origin iframe: FAIL (Chrome: PASS, Safari: FAIL)
    • Parent tool with empty exposedTo array is not visible to cross-origin iframe: FAIL (Chrome: PASS, Safari: FAIL)
    • Cross-origin iframe tool with default exposure is not visible to parent: FAIL (Chrome: PASS, Safari: FAIL)
    • Cross-origin iframe tool with empty exposedTo array is not visible to parent: FAIL (Chrome: PASS, Safari: FAIL)
  • /webmcp/imperative/exposedTo-defaults-same-origin.https.html [wpt.fyi]
    • Parent tool with missing exposedTo array is visible to same-origin iframe: FAIL (Chrome: PASS, Safari: FAIL)
    • Parent tool with empty exposedTo array is visible to same-origin iframe: FAIL (Chrome: PASS, Safari: FAIL)
    • Same-origin iframe tool with default exposure is visible to parent: FAIL (Chrome: PASS, Safari: FAIL)
    • Same-origin iframe tool with empty exposedTo array is visible to parent: FAIL (Chrome: PASS, Safari: FAIL)
  • /webmcp/imperative/exposedTo-invalid-origins.https.html [wpt.fyi]
    • registerTool() throws SecurityError for invalid or non-potentially-trustworthy origins like / in exposedTo: FAIL (Chrome: FAIL, Safari: FAIL)
    • registerTool() throws SecurityError for invalid or non-potentially-trustworthy origins like * in exposedTo: FAIL (Chrome: FAIL, Safari: FAIL)
    • registerTool() throws SecurityError for invalid or non-potentially-trustworthy origins like https://example:bogus in exposedTo: FAIL (Chrome: FAIL, Safari: FAIL)
    • registerTool() throws SecurityError for invalid or non-potentially-trustworthy origins like https://U+d800.com in exposedTo: FAIL (Chrome: FAIL, Safari: FAIL)
    • registerTool() throws SecurityError for invalid or non-potentially-trustworthy origins like http://example.com in exposedTo: FAIL (Chrome: FAIL, Safari: FAIL)
    • registerTool() throws SecurityError for invalid or non-potentially-trustworthy origins like ftp://example.com in exposedTo: FAIL (Chrome: FAIL, Safari: FAIL)
    • registerTool() throws SecurityError for invalid or non-potentially-trustworthy origins like about:blank in exposedTo: FAIL (Chrome: FAIL, Safari: FAIL)
    • registerTool() throws SecurityError for invalid or non-potentially-trustworthy origins like about:srcdoc in exposedTo: FAIL (Chrome: FAIL, Safari: FAIL)
    • registerTool() throws SecurityError for invalid or non-potentially-trustworthy origins like https://example.com in exposedTo: FAIL (Chrome: PASS, Safari: FAIL)
    • registerTool() throws SecurityError for invalid or non-potentially-trustworthy origins like http://localhost:3000 in exposedTo: FAIL (Chrome: PASS, Safari: FAIL)
    • registerTool() with abort signal reason because signal is processed before exposedTo: FAIL (Chrome: FAIL, Safari: FAIL)
  • /webmcp/imperative/exposedTo-window-open.https.html [wpt.fyi]
    • Tools are scoped to a frame tree, and are not exposed across opener boundaries.: FAIL (Chrome: PASS, Safari: FAIL)
  • /webmcp/imperative/getTools-filtering.https.html [wpt.fyi]
    • getTools() correctly filters returned tools by fromOrigins origins while preserving same-origin tools: FAIL (Chrome: PASS, Safari: FAIL)
    • getTools() rejects with SecurityError if an insecure origin is supplied in fromOrigins: FAIL (Chrome: PASS, Safari: FAIL)
  • /webmcp/imperative/getTools.https.html [wpt.fyi]
    • getTools should return all tools sorted in lexicographical order: FAIL
  • /webmcp/imperative/model_context.https.html [wpt.fyi]
    • document.modelContext instanceof ModelContext: FAIL
  • /webmcp/imperative/opaque-origin-tools.https.html [wpt.fyi]
    • An opaque origin document can register but not execute its own tools: FAIL (Chrome: PASS, Safari: FAIL)
  • /webmcp/imperative/register-tool-title.https.html [wpt.fyi]
    • Tool title is preserved when provided: FAIL (Chrome: PASS, Safari: FAIL)
    • Missing tool title in registration is exposed as empty string: FAIL (Chrome: PASS, Safari: FAIL)
    • Tool title with unpaired surrogate is fixed up by USVString: FAIL (Chrome: PASS, Safari: FAIL)
  • /webmcp/imperative/register_tool_invalid_json_schema.https.html [wpt.fyi]
    • WebMCP registerTool throws on invalid schema: FAIL (Chrome: FAIL, Safari: FAIL)
    • WebMCP registerTool throws on invalid schema 1: FAIL (Chrome: FAIL, Safari: FAIL)
    • WebMCP registerTool throws on invalid schema 2: FAIL (Chrome: FAIL, Safari: FAIL)
    • registerTool rejects on invalid schema even if an aborted signal was provided: FAIL (Chrome: FAIL, Safari: FAIL)
  • /webmcp/imperative/register_tool_name_validation.https.html [wpt.fyi]
    • Valid tool names are accepted.: FAIL (Chrome: PASS, Safari: FAIL)
    • Invalid tool names throw InvalidStateError.: FAIL (Chrome: FAIL, Safari: FAIL)
  • /webmcp/imperative/register_tool_no_schema.https.html [wpt.fyi]
    • register tool with only required params: FAIL (Chrome: PASS, Safari: FAIL)
  • /webmcp/imperative/register_tool_signal.https.html [wpt.fyi]
    • register tool promise rejects with AbortError when signal gets aborted: FAIL (Chrome: FAIL, Safari: FAIL)
    • register tool promise rejects with error when signal gets aborted: FAIL (Chrome: FAIL, Safari: FAIL)
    • register tool promise rejects when signal is already aborted: FAIL (Chrome: FAIL, Safari: FAIL)
    • aborting signal unregister tool: FAIL (Chrome: PASS, Safari: FAIL)
  • /webmcp/imperative/register_tool_toolchange.https.html [wpt.fyi]
    • registerTool triggers toolchange before promise resolves: FAIL (Chrome: FAIL, Safari: FAIL)
  • /webmcp/imperative/register_tool_with_empty_annotation.https.html [wpt.fyi]
    • register tool with empty annotations: FAIL (Chrome: PASS, Safari: FAIL)
  • /webmcp/imperative/register_tool_with_schema.https.html [wpt.fyi]
    • register and unregister script tool: FAIL (Chrome: PASS, Safari: FAIL)
    • registerTool succeeds when inputSchema.toJSON() returns 'undefined': FAIL (Chrome: PASS, Safari: FAIL)
  • /webmcp/imperative/same-origin-iframe-registerTool-regression.https.html [wpt.fyi]
    • registerTool() does not reject in connected same-origin iframe navigated away of about:blank: FAIL (Chrome: PASS, Safari: FAIL)
  • /webmcp/imperative/unregister-during-executeTool.https.html [wpt.fyi]
    • Pending executeTool() Promise is rejected when the target cross-origin tool is unregistered: FAIL (Chrome: PASS, Safari: FAIL)

Tests Disabled in Gecko Infrastructure

  • /webmcp/imperative/exposedTo-cross-origin-child.https.html [wpt.fyi]: SKIP [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-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt], TIMEOUT [GitHub] (Chrome: OK, Safari: TIMEOUT)
  • /webmcp/imperative/exposedTo-multiple-children.https.html [wpt.fyi]: SKIP [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-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt], TIMEOUT [GitHub] (Chrome: OK, Safari: TIMEOUT)
  • /webmcp/imperative/permissions-policy.https.html [wpt.fyi]: SKIP [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-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt], TIMEOUT [GitHub] (Chrome: OK, Safari: TIMEOUT)
Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 154 Branch
You need to log in before you can comment on or make changes to this bug.