commit b03b7033edc1974f3e0b4316c7e51b2983790203
parent ad8899f0a014ca50b7d8780aa7f9811ac08c1944
Author: Maksim Sadym <69349599+sadym-chromium@users.noreply.github.com>
Date: Wed, 15 Oct 2025 08:25:13 +0000
Bug 1993920 [wpt PR 55353] - [wdspec] fix `test_data_persists_after_closing`, a=testonly
Automatic update from web-platform-tests
[wdspec] fix `test_data_persists_after_closing` (#55353)
Do not close the last tab, as it may cause closing the browser.
--
wpt-commits: 5c0733716f1cc6349f12dd4918d20f420100bb7c
wpt-pr: 55353
Diffstat:
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/testing/web-platform/tests/webdriver/tests/bidi/network/get_data/persistence.py b/testing/web-platform/tests/webdriver/tests/bidi/network/get_data/persistence.py
@@ -52,8 +52,10 @@ async def test_data_persists_after_navigation(bidi_session, top_context,
@pytest.mark.asyncio
-async def test_data_persists_after_closing(bidi_session, top_context,
- setup_network_test, add_data_collector, test_page):
+async def test_data_persists_after_closing(bidi_session, setup_network_test,
+ add_data_collector, test_page):
+ new_context = await bidi_session.browsing_context.create(type_hint="tab")
+
network_events = await setup_network_test(
events=["network.responseCompleted"])
events = network_events["network.responseCompleted"]
@@ -67,7 +69,7 @@ async def test_data_persists_after_closing(bidi_session, top_context,
# Init first navigation.
await bidi_session.browsing_context.navigate(
- context=top_context["context"],
+ context=new_context["context"],
url=test_page,
wait="complete",
)
@@ -83,7 +85,7 @@ async def test_data_persists_after_closing(bidi_session, top_context,
assert "<div>foo</div>" in data["value"]
# Close the page.
- await bidi_session.browsing_context.close(context=top_context["context"])
+ await bidi_session.browsing_context.close(context=new_context["context"])
# Assert data is still available.
data = await bidi_session.network.get_data(request=request,