You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: url/tests/setters_tests.json
+55-1
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
2
"comment": [
3
-
"AS OF https://github.com/jsdom/whatwg-url/commit/35f04dfd3048cf6362f4398745bb13375c5020c2",
3
+
"AS OF https://github.com/web-platform-tests/wpt/blob/09b34ae130cd946e111cd427d6bcf2d6f257aed8/url/resources/setters_tests.json, but only passing tests",
4
4
"## Tests for setters of https://url.spec.whatwg.org/#urlutils-members",
5
5
"",
6
6
"This file contains a JSON object.",
@@ -1653,6 +1653,24 @@
1653
1653
"href": "file:///",
1654
1654
"pathname": "/"
1655
1655
}
1656
+
},
1657
+
{
1658
+
"comment": "Trailing space should be encoded",
1659
+
"href": "http://example.net",
1660
+
"new_value": "",
1661
+
"expected": {
1662
+
"href": "http://example.net/%20",
1663
+
"pathname": "/%20"
1664
+
}
1665
+
},
1666
+
{
1667
+
"comment": "Trailing C0 control should be encoded",
1668
+
"href": "http://example.net",
1669
+
"new_value": "\u0000",
1670
+
"expected": {
1671
+
"href": "http://example.net/%00",
1672
+
"pathname": "/%00"
1673
+
}
1656
1674
}
1657
1675
],
1658
1676
"search": [
@@ -1737,6 +1755,24 @@
1737
1755
"href": "http://example.net/?%c3%89t%C3%A9",
1738
1756
"search": "?%c3%89t%C3%A9"
1739
1757
}
1758
+
},
1759
+
{
1760
+
"comment": "Trailing space should be encoded",
1761
+
"href": "http://example.net",
1762
+
"new_value": "",
1763
+
"expected": {
1764
+
"href": "http://example.net/?%20",
1765
+
"search": "?%20"
1766
+
}
1767
+
},
1768
+
{
1769
+
"comment": "Trailing C0 control should be encoded",
1770
+
"href": "http://example.net",
1771
+
"new_value": "\u0000",
1772
+
"expected": {
1773
+
"href": "http://example.net/?%00",
1774
+
"search": "?%00"
1775
+
}
1740
1776
}
1741
1777
],
1742
1778
"hash": [
@@ -1871,6 +1907,24 @@
1871
1907
"href": "javascript:alert(1)#castle",
1872
1908
"hash": "#castle"
1873
1909
}
1910
+
},
1911
+
{
1912
+
"comment": "Trailing space should be encoded",
1913
+
"href": "http://example.net",
1914
+
"new_value": "",
1915
+
"expected": {
1916
+
"href": "http://example.net/#%20",
1917
+
"hash": "#%20"
1918
+
}
1919
+
},
1920
+
{
1921
+
"comment": "Trailing C0 control should be encoded",
0 commit comments