Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that disables it given conditions:
- os == "android" : bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1762066
- This test has a WPT meta file that expects 1 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /webdriver/tests/classic/get_current_url/file.py - WPT Dashboard Interop Dashboard
from tests.support import platform_name
from tests.support.asserts import assert_success
def get_current_url(session):
return session.transport.send(
"GET", "session/{session_id}/url".format(**vars(session)))
def test_get_current_url_file_protocol(session, server_config):
# tests that the browsing context remains the same
# when navigated privileged documents
path = server_config["doc_root"]
if platform_name == "windows":
# Convert the path into the format eg. /c:/foo/bar
path = "/{}".format(path.replace("\\", "/"))
session.url = url
response = get_current_url(session)
if response.status == 200 and response.body['value'].endswith('/'):
url += '/'
assert_success(response, url)