Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: roll to Playwright 1.26.0-beta-1663620933000 #1555

Merged
merged 4 commits into from
Sep 20, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
23 changes: 18 additions & 5 deletions tests/async/test_navigation.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,19 +542,32 @@ async def test_wait_for_nav_should_work_with_dom_history_back_forward(page, serv
assert page.url == server.PREFIX + "/second.html"


async def test_wait_for_nav_should_work_when_subframe_issues_window_stop(page, server):
async def test_wait_for_nav_should_work_when_subframe_issues_window_stop(
page, server, is_webkit
):
server.set_route("/frames/style.css", lambda _: None)
navigation_promise = asyncio.create_task(
page.goto(server.PREFIX + "/frames/one-frame.html")
)
done = False

async def nav_and_mark_done():
nonlocal done
await page.goto(server.PREFIX + "/frames/one-frame.html")
done = True

task = asyncio.create_task(nav_and_mark_done())
await asyncio.sleep(0)
async with page.expect_event("frameattached") as frame_info:
pass
frame = await frame_info.value

async with page.expect_event("framenavigated", lambda f: f == frame):
pass
await asyncio.gather(frame.evaluate("() => window.stop()"), navigation_promise)
await frame.evaluate("() => window.stop()")
await page.wait_for_timeout(2000) # give it some time to erroneously resolve
assert done == (
not is_webkit
) # Chromium and Firefox issue load event in this case.
if is_webkit:
task.cancel()
rwoll marked this conversation as resolved.
Show resolved Hide resolved


async def test_wait_for_nav_should_work_with_url_match(page, server):
Expand Down