mirror of
https://github.com/servo/servo.git
synced 2025-09-01 02:28:21 +01:00
Update web-platform-tests to revision e8bfc205e36ad699601212cd50083870bad9a75d
This commit is contained in:
parent
65dd6d4340
commit
ccdb0a3458
1428 changed files with 118036 additions and 9786 deletions
|
@ -346,14 +346,14 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"comment": "Port number is removed if empty in the new value",
|
||||
"comment": "Port number is unchanged if not specified",
|
||||
"href": "http://example.net:8080",
|
||||
"new_value": "example.com:",
|
||||
"expected": {
|
||||
"href": "http://example.com/",
|
||||
"host": "example.com",
|
||||
"href": "http://example.com:8080/",
|
||||
"host": "example.com:8080",
|
||||
"hostname": "example.com",
|
||||
"port": ""
|
||||
"port": "8080"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -761,7 +761,7 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"comment": "Port number is removed if empty in the new value",
|
||||
"comment": "Port number is removed if empty is the new value",
|
||||
"href": "http://example.net:8080",
|
||||
"new_value": "",
|
||||
"expected": {
|
||||
|
@ -973,6 +973,15 @@
|
|||
"href": "http://example.net/..%c3%89t%C3%A9",
|
||||
"pathname": "/..%c3%89t%C3%A9"
|
||||
}
|
||||
},
|
||||
{
|
||||
"comment": "? needs to be encoded",
|
||||
"href": "http://example.net",
|
||||
"new_value": "?",
|
||||
"expected": {
|
||||
"href": "http://example.net/%3F",
|
||||
"pathname": "/%3F"
|
||||
}
|
||||
}
|
||||
],
|
||||
"search": [
|
||||
|
|
|
@ -37,7 +37,23 @@ function runURLSettersTests(all_test_cases) {
|
|||
for (var attribute in test_case.expected) {
|
||||
assert_equals(url[attribute], test_case.expected[attribute])
|
||||
}
|
||||
}, name)
|
||||
}, "URL: " + name)
|
||||
test(function() {
|
||||
var url = document.createElement("a");
|
||||
url.href = test_case.href;
|
||||
url[attribute_to_be_set] = test_case.new_value;
|
||||
for (var attribute in test_case.expected) {
|
||||
assert_equals(url[attribute], test_case.expected[attribute])
|
||||
}
|
||||
}, "<a>: " + name)
|
||||
test(function() {
|
||||
var url = document.createElement("area");
|
||||
url.href = test_case.href;
|
||||
url[attribute_to_be_set] = test_case.new_value;
|
||||
for (var attribute in test_case.expected) {
|
||||
assert_equals(url[attribute], test_case.expected[attribute])
|
||||
}
|
||||
}, "<area>: " + name)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -840,6 +840,36 @@
|
|||
"search": "",
|
||||
"hash": ""
|
||||
},
|
||||
{
|
||||
"input": "http://[::127.0.0.1]",
|
||||
"base": "http://example.org/foo/bar",
|
||||
"href": "http://[::7f00:1]/",
|
||||
"origin": "http://[::7f00:1]",
|
||||
"protocol": "http:",
|
||||
"username": "",
|
||||
"password": "",
|
||||
"host": "[::7f00:1]",
|
||||
"hostname": "[::7f00:1]",
|
||||
"port": "",
|
||||
"pathname": "/",
|
||||
"search": "",
|
||||
"hash": ""
|
||||
},
|
||||
{
|
||||
"input": "http://[0:0:0:0:0:0:13.1.68.3]",
|
||||
"base": "http://example.org/foo/bar",
|
||||
"href": "http://[::d01:4403]/",
|
||||
"origin": "http://[::d01:4403]",
|
||||
"protocol": "http:",
|
||||
"username": "",
|
||||
"password": "",
|
||||
"host": "[::d01:4403]",
|
||||
"hostname": "[::d01:4403]",
|
||||
"port": "",
|
||||
"pathname": "/",
|
||||
"search": "",
|
||||
"hash": ""
|
||||
},
|
||||
{
|
||||
"input": "http://[2001::1]:80",
|
||||
"base": "http://example.org/foo/bar",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue