|
1592 | 1592 | "port": "8080"
|
1593 | 1593 | }
|
1594 | 1594 | },
|
| 1595 | + { |
| 1596 | + "comment": "Setting port to a string that doesn't parse as a number", |
| 1597 | + "href": "http://example.net:8080/path", |
| 1598 | + "new_value": "randomstring", |
| 1599 | + "expected": { |
| 1600 | + "href": "http://example.net:8080/path", |
| 1601 | + "host": "example.net:8080", |
| 1602 | + "hostname": "example.net", |
| 1603 | + "port": "8080" |
| 1604 | + } |
| 1605 | + }, |
1595 | 1606 | {
|
1596 | 1607 | "comment": "Port numbers are 16 bit integers, overflowing is an error",
|
1597 | 1608 | "href": "non-special://example.net:8080/path",
|
|
1650 | 1661 | "href": "javascript://x:12/",
|
1651 | 1662 | "port": "12"
|
1652 | 1663 | }
|
| 1664 | + }, |
| 1665 | + { |
| 1666 | + "comment": "Leading u0009 on special scheme", |
| 1667 | + "href": "https://domain.com:443", |
| 1668 | + "new_value": "\u00098080", |
| 1669 | + "expected": { |
| 1670 | + "port": "8080" |
| 1671 | + } |
| 1672 | + }, |
| 1673 | + { |
| 1674 | + "comment": "Leading u0009 on non-special scheme", |
| 1675 | + "href": "wpt++://domain.com:443", |
| 1676 | + "new_value": "\u00098080", |
| 1677 | + "expected": { |
| 1678 | + "port": "8080" |
| 1679 | + } |
| 1680 | + }, |
| 1681 | + { |
| 1682 | + "comment": "Should use all ascii prefixed characters as port", |
| 1683 | + "href": "https://www.google.com:4343", |
| 1684 | + "new_value": "4wpt", |
| 1685 | + "expected": { |
| 1686 | + "port": "4" |
| 1687 | + } |
1653 | 1688 | }
|
1654 | 1689 | ],
|
1655 | 1690 | "pathname": [
|
|
2205 | 2240 | "hash": ""
|
2206 | 2241 | }
|
2207 | 2242 | }
|
| 2243 | + ], |
| 2244 | + "href": [ |
| 2245 | + { |
| 2246 | + "href": "file:///var/log/system.log", |
| 2247 | + "new_value": "http://0300.168.0xF0", |
| 2248 | + "expected": { |
| 2249 | + "href": "http://192.168.0.240/", |
| 2250 | + "protocol": "http:" |
| 2251 | + } |
| 2252 | + } |
2208 | 2253 | ]
|
2209 | 2254 | }
|
0 commit comments