-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
More tests for file URL Window drive letter quirk #4382
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,4 @@ | |
<script src="a-element-origin.js"></script> | ||
</body> | ||
</html> | ||
<!-- Other dependencies: urltestdata.json --> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,4 @@ | |
<script src="a-element.js"></script> | ||
</body> | ||
</html> | ||
<!-- Other dependencies: urltestdata.json --> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4647,5 +4647,76 @@ | |
"pathname": "/", | ||
"search": "", | ||
"hash": "" | ||
}, | ||
"# More file URL tests by zcorpan", | ||
{ | ||
"input": "/", | ||
"base": "file:///C:/a/b", | ||
"href": "file:///C:/", | ||
"protocol": "file:", | ||
"username": "", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pathname should be "/C:/" not "/" |
||
"password": "", | ||
"host": "", | ||
"hostname": "", | ||
"port": "", | ||
"pathname": "/C:/", | ||
"search": "", | ||
"hash": "" | ||
}, | ||
{ | ||
"input": "//d:", | ||
"base": "file:///C:/a/b", | ||
"href": "file:///d:", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should end in a slash, no? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. https://url.spec.whatwg.org/#file-state "/" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That seems correct, but then pathname wouldn't end in a "/" either. It's also not entirely clear to me that is the desired outcome. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pathname should be "/d:" not "/d:/" |
||
"protocol": "file:", | ||
"username": "", | ||
"password": "", | ||
"host": "", | ||
"hostname": "", | ||
"port": "", | ||
"pathname": "/d:", | ||
"search": "", | ||
"hash": "" | ||
}, | ||
{ | ||
"input": "//d:/..", | ||
"base": "file:///C:/a/b", | ||
"href": "file:///d:/", | ||
"protocol": "file:", | ||
"username": "", | ||
"password": "", | ||
"host": "", | ||
"hostname": "", | ||
"port": "", | ||
"pathname": "/d:/", | ||
"search": "", | ||
"hash": "" | ||
}, | ||
{ | ||
"input": "..", | ||
"base": "file:///ab:/", | ||
"href": "file:///", | ||
"protocol": "file:", | ||
"username": "", | ||
"password": "", | ||
"host": "", | ||
"hostname": "", | ||
"port": "", | ||
"pathname": "/", | ||
"search": "", | ||
"hash": "" | ||
}, | ||
{ | ||
"input": "..", | ||
"base": "file:///1:/", | ||
"href": "file:///", | ||
"protocol": "file:", | ||
"username": "", | ||
"password": "", | ||
"host": "", | ||
"hostname": "", | ||
"port": "", | ||
"pathname": "/", | ||
"search": "", | ||
"hash": "" | ||
} | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we put the author here? Should I do that too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just wanted to separate these tests from the ones above to direct any blame at me, but of course
git blame
works too. Can remove it though.