Skip to content

Commit

Permalink
Merge 04b0796 into 3fc7f40
Browse files Browse the repository at this point in the history
  • Loading branch information
annevk authored Feb 2, 2017
2 parents 3fc7f40 + 04b0796 commit 37e78cf
Show file tree
Hide file tree
Showing 2 changed files with 172 additions and 0 deletions.
152 changes: 152 additions & 0 deletions url/setters_tests.json
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,22 @@
"href": "http://%c3%89t%C3%A9@example.net/",
"username": "%c3%89t%C3%A9"
}
},
{
"href": "sc:///",
"new_value": "x",
"expected": {
"href": "sc:///",
"username": ""
}
},
{
"href": "file://test/",
"new_value": "test",
"expected": {
"href": "file://test/",
"username": ""
}
}
],
"password": [
Expand Down Expand Up @@ -343,6 +359,22 @@
"href": "http://:%c3%89t%C3%A9@example.net/",
"password": "%c3%89t%C3%A9"
}
},
{
"href": "sc:///",
"new_value": "x",
"expected": {
"href": "sc:///",
"password": ""
}
},
{
"href": "file://test/",
"new_value": "test",
"expected": {
"href": "file://test/",
"password": ""
}
}
],
"host": [
Expand Down Expand Up @@ -759,6 +791,46 @@
"host": "example.net",
"hostname": "example.net"
}
},
{
"href": "file://y/",
"new_value": "x:123",
"expected": {
"href": "file://y/",
"host": "y",
"hostname": "y",
"port": ""
}
},
{
"href": "file://y/",
"new_value": "loc%41lhost",
"expected": {
"href": "file:///",
"host": "",
"hostname": "",
"port": ""
}
},
{
"href": "sc://test@test/",
"new_value": "",
"expected": {
"href": "sc://test@test/",
"host": "test",
"hostname": "test",
"username": "test"
}
},
{
"href": "sc://test:12/",
"new_value": "",
"expected": {
"href": "sc://test:12/",
"host": "test:12",
"hostname": "test",
"port": "12"
}
}
],
"hostname": [
Expand Down Expand Up @@ -1043,6 +1115,46 @@
"host": "example.net",
"hostname": "example.net"
}
},
{
"href": "file://y/",
"new_value": "x:123",
"expected": {
"href": "file://y/",
"host": "y",
"hostname": "y",
"port": ""
}
},
{
"href": "file://y/",
"new_value": "loc%41lhost",
"expected": {
"href": "file:///",
"host": "",
"hostname": "",
"port": ""
}
},
{
"href": "sc://test@test/",
"new_value": "",
"expected": {
"href": "sc://test@test/",
"host": "test",
"hostname": "test",
"username": "test"
}
},
{
"href": "sc://test:12/",
"new_value": "",
"expected": {
"href": "sc://test:12/",
"host": "test:12",
"hostname": "test",
"port": "12"
}
}
],
"port": [
Expand Down Expand Up @@ -1198,6 +1310,46 @@
"hostname": "example.net",
"port": "8080"
}
},
{
"href": "file://test/",
"new_value": "12",
"expected": {
"href": "file://test/",
"port": ""
}
},
{
"href": "file://localhost/",
"new_value": "12",
"expected": {
"href": "file:///",
"port": ""
}
},
{
"href": "non-base:value",
"new_value": "12",
"expected": {
"href": "non-base:value",
"port": ""
}
},
{
"href": "sc:///",
"new_value": "12",
"expected": {
"href": "sc:///",
"port": ""
}
},
{
"href": "sc://x/",
"new_value": "12",
"expected": {
"href": "sc://x:12/",
"port": "12"
}
}
],
"pathname": [
Expand Down
20 changes: 20 additions & 0 deletions url/urltestdata.json
Original file line number Diff line number Diff line change
Expand Up @@ -1019,6 +1019,26 @@
"search": "",
"hash": ""
},
{
"input": "file://example:1/",
"base": "about:blank",
"failure": true
},
{
"input": "file://example:test/",
"base": "about:blank",
"failure": true
},
{
"input": "file://example%/",
"base": "about:blank",
"failure": true
},
{
"input": "file://[example]/",
"base": "about:blank",
"failure": true
},
{
"input": "ftps:/example.com/",
"base": "http://example.org/foo/bar",
Expand Down

0 comments on commit 37e78cf

Please sign in to comment.