Bug 1561196 - [wdspec] Fix number of slashes for file:// url tests. r=webdriver-reviewers,ato

Differential Revision: https://phabricator.services.mozilla.com/D35778

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Henrik Skupin 2019-06-25 12:03:01 +00:00
parent a105e5d2c9
commit c24c642552
2 changed files with 6 additions and 4 deletions

View File

@ -46,8 +46,9 @@ def test_get_current_url_file_protocol(session, server_config):
# when navigated privileged documents
path = server_config["doc_root"]
if platform_name == "windows":
path = path.replace("\\", "/")
url = u"file:///{}".format(path)
# Convert the path into the format eg. /c:/foo/bar
path = "/{}".format(path.replace("\\", "/"))
url = u"file://{}".format(path)
session.url = url
response = get_current_url(session)

View File

@ -33,8 +33,9 @@ def test_file_protocol(session, server_config):
# when navigated privileged documents
path = server_config["doc_root"]
if platform_name == "windows":
path = path.replace("\\", "/")
url = u"file:///{}".format(path)
# Convert the path into the format eg. /c:/foo/bar
path = "/{}".format(path.replace("\\", "/"))
url = u"file://{}".format(path)
response = navigate_to(session, url)
assert_success(response)