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

[Gecko Bug 1849972] [wdspec] Only use local network in WebDriver BiDi's reload.py. #41661

Merged
merged 2 commits into from
Aug 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions tools/wptrunner/wptrunner/browsers/firefox.py
Original file line number Diff line number Diff line change
Expand Up @@ -915,11 +915,6 @@ def get_env(self, binary, debug_info, headless, chaos_mode_flags):
headless,
chaos_mode_flags)
env["RUST_BACKTRACE"] = "1"
# This doesn't work with wdspec tests
# In particular tests can create a session without passing in the capabilites
# and in those cases we get the default geckodriver profile which doesn't
# guarantee zero network access
del env["MOZ_DISABLE_NONLOCAL_CONNECTIONS"]
return env

def create_output_handler(self, cmd):
Expand Down
1 change: 0 additions & 1 deletion tools/wptrunner/wptrunner/browsers/firefox_android.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,6 @@ def stop(self, force=False):
def get_env(self, binary, debug_info, headless, chaos_mode_flags):
env = get_environ(chaos_mode_flags)
env["RUST_BACKTRACE"] = "1"
del env["MOZ_DISABLE_NONLOCAL_CONNECTIONS"]
return env

def executor_browser(self):
Expand Down
14 changes: 9 additions & 5 deletions webdriver/tests/bidi/browsing_context/reload/reload.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,31 @@ async def test_return_value(bidi_session, inline, new_tab):
"initial_url",
[
"about:blank",
"https://example.com/#foo",
"https://{host}",
"https://{host}/#foo",
"data:text/html,<p>foo</p>",
f'file://{Path(__file__).parent.parent.resolve() / "support/empty.html"}',
],
ids=[
"about:blank",
"hash",
"without hash",
"with hash",
"data url",
"file url",
],
)
async def test_reload(bidi_session, new_tab, initial_url):
async def test_reload(bidi_session, server_config, new_tab, initial_url):
target_url = initial_url.format(host=server_config["domains"][""][""])

await bidi_session.browsing_context.navigate(context=new_tab["context"],
url=initial_url)
url=target_url)
await bidi_session.browsing_context.reload(context=new_tab["context"],
wait="complete")

contexts = await bidi_session.browsing_context.get_tree(
root=new_tab['context'])
assert len(contexts) == 1
assert contexts[0]["url"] == initial_url
assert contexts[0]["url"] == target_url


async def test_image(bidi_session, new_tab, url):
Expand Down