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

Allow trailing slash in test_get_current_url_file_protocol #17679

Merged
merged 1 commit into from Jul 10, 2019
Merged

Allow trailing slash in test_get_current_url_file_protocol #17679

merged 1 commit into from Jul 10, 2019

Conversation

julianrkung
Copy link
Contributor

Chrome automatically adds a trailing slash if the suffix of the file protocol is a directory. Chromedriver currently fails this test due to this trailing slash (the rest of the URL is identical). This changelist considers urls with and without a trailing slash correct.

@andreastt
Copy link
Member

But Firefox doesn’t do this? Smells like a web compat issue that should be fixed in Firefox/Chrome.

Copy link
Member

@andreastt andreastt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deferring this review until we’ve confirmed where this problem lies.

@andreastt
Copy link
Member

@julianrkung
Copy link
Contributor Author

Looks like this particular subject isn't covered by URL standards. If not covered by the standards, shouldn't both (legitimate) implementations be accepted and considered valid? In any case, I believe that since this issue is a Firefox/Chrome standards issue, it is out of the scope of webdrivers (and therefore out of scope for this webdriver test) and shouldn't be considered during this test. If chromedriver adheres to the W3C Get Current URL spec (which it does), it should pass the test.

@andreastt
Copy link
Member

My intention wasn’t to block this patch for any of those reasons. I wanted confirmation that we weren’t applying a workaround for what might conceivably be a web compatibility issue.

This is somewhat important to clarify because WebDriver is used extensively to test other web standards.

Anyway, I asked around and found this in the Fetch standard on scheme fetch:

For now, unfortunate as it is, file URLs are left as an exercise for the reader.

That means the behaviour is implementation defined and, as you suggested, that the test should pass regardless what the browser returns.

@andreastt andreastt merged commit 59ea78a into web-platform-tests:master Jul 10, 2019
natechapin pushed a commit to natechapin/wpt that referenced this pull request Aug 23, 2019
…web-platform-tests#17679)

Fetcing file:// protocol is not standardised which means the test
has to be more forgiving of the URL returned.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants