Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 3ed4c197ac72a9cc85a3048e4cb9c3e7abce66f6
https://github.com/WebKit/WebKit/commit/3ed4c197ac72a9cc85a3048e4cb9c3e7abce66f6
Author: Júlio Piubello <[email protected]>
Date: 2026-02-03 (Tue, 03 Feb 2026)
Changed paths:
M Source/WebKit/UIProcess/Automation/BidiBrowsingContextAgent.cpp
M WebDriverTests/TestExpectations.json
Log Message:
-----------
WebDriver BiDi browsingContext.close should reject child contexts with
invalid arguments.
https://bugs.webkit.org/show_bug.cgi?id=288326.
Reviewed by BJ Burg. Patch by Julio Piubello.
Per the WebDriver BiDi spec, browsingContext.close must return invalid argument
when the provided context resolves to a non–top-level traversable (e.g. an
iframe).
WebKit now resolves the provided context via extractBrowsingContextHandles and
returns InvalidParameter (mapped to BiDi invalid argument) for child contexts,
while preserving the existing “no such frame” behavior for unknown ids. The
promptUnload option remains unimplemented.
overview doc:
https://docs.google.com/document/d/10_pzxIfW-7xoMfE4f1HX5ADEo-7zFiSr_oLeKdDD3EI/edit?usp=sharing
This fixes:
imported/w3c/webdriver/tests/bidi/browsing_context/close/invalid.py::test_child_context
Test: imported/w3c/webdriver/tests/bidi/browsing_context/close/invalid.py
* Source/WebKit/UIProcess/Automation/BidiBrowsingContextAgent.cpp:
(WebKit::BidiBrowsingContextAgent::close): Return invalid argument for
non-top-level contexts.
* WebDriverTests/TestExpectations.json: Remove FAIL expectation for
test_child_context.
Canonical link: https://commits.webkit.org/306722@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications