Repository navigation
Open
Labels
Description
│ ▶ FAIL [expected PASS] test_down_closes_browsing_context[without up]
│ │ → Failed: DID NOT RAISE <class 'webdriver.error.NoSuchWindowException'>
│ │
│ │ session = <Session 3e68ec92-b12a-4f67-bba1-6498a6bcb3dd>
│ │ configuration = {'browser': {'args': ['--pref=network_http_proxy_uri=', '--pref=network_https_proxy_uri=', '--config-dir', '/tmp/servo... 'ACTIONS_RUNNER_RETURN_JOB_RESULT_FOR_HOSTED': '1', ...}}, 'capabilities': {}, 'display': None, 'headless': True, ...}
│ │ inline = <function inline.<locals>.inline at 0x7f64f10bef20>
│ │ mouse_chain = <webdriver.client.ActionSequence object at 0x7f64f12fd990>
│ │ mouse_up = False
│ │
│ │ @pytest.mark.parametrize("mouse_up", [False, True], ids=["without up", "with up"])
│ │ def test_down_closes_browsing_context(
│ │ session, configuration, inline, mouse_chain, mouse_up
│ │ ):
│ │ # Opening a new tab/window via `window.open` is required
│ │ # for the script to be able to close it.
│ │ new_window = session.execute_script(f"return window.open()")
│ │ session.window_handle = new_window.id
│ │ session.url = inline("""<input onmousedown="window.close()">close</input>""")
│ │
│ │ origin = session.find.css("input", all=False)
│ │
│ │ if mouse_up:
│ │ with pytest.raises(NoSuchWindowException):
│ │ mouse_chain.pointer_move(0, 0, origin=origin) \
│ │ .pointer_down(button=0) \
│ │ .pause(100 * configuration["timeout_multiplier"]) \
│ │ .pointer_up(button=0) \
│ │ .perform()
│ │ else:
│ │ mouse_chain.pointer_move(0, 0, origin=origin) \
│ │ .pointer_down(button=0) \
│ │ .perform()
│ │
│ │ > with pytest.raises(NoSuchWindowException):
│ │ E Failed: DID NOT RAISE <class 'webdriver.error.NoSuchWindowException'>
Activity