| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -27,7 +27,7 @@ Last update: | |||
| 27 | 27 | - performance-timeline: https://github.com/web-platform-tests/wpt/tree/17ebc3aea0/performance-timeline | |
| 28 | 28 | - resources: https://github.com/web-platform-tests/wpt/tree/fbf1e7d247/resources | |
| 29 | 29 | - streams: https://github.com/web-platform-tests/wpt/tree/9e5ef42bd3/streams | |
| 30 | - - url: https://github.com/web-platform-tests/wpt/tree/f1ade799d0/url | ||
| 30 | + - url: https://github.com/web-platform-tests/wpt/tree/1eaeb0e178/url | ||
| 31 | 31 | - user-timing: https://github.com/web-platform-tests/wpt/tree/df24fb604e/user-timing | |
| 32 | 32 | - wasm/jsapi: https://github.com/web-platform-tests/wpt/tree/d8dbe6990b/wasm/jsapi | |
| 33 | 33 | - wasm/webapi: https://github.com/web-platform-tests/wpt/tree/fd1b23eeaa/wasm/webapi | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,7 +5,6 @@ | |||
| 5 | 5 | <script src=/resources/testharness.js></script> | |
| 6 | 6 | <script src=/resources/testharnessreport.js></script> | |
| 7 | 7 | <div id=log></div> | |
| 8 | - <iframe></iframe> | ||
| 9 | 8 | <script> | |
| 10 | 9 | promise_test(() => fetch("resources/urltestdata.json").then(res => res.json()).then(runTests), "Loading data…") | |
| 11 | 10 | ||
@@ -41,9 +40,11 @@ | |||
| 41 | 40 | assert_throws_js(TypeError, () => self.navigator.sendBeacon(test.input)) | |
| 42 | 41 | }, "sendBeacon(): " + name) | |
| 43 | 42 | ||
| 44 | - self.test(() => { | ||
| 45 | - assert_throws_js(self[0].TypeError, () => self[0].location = test.input) | ||
| 46 | - }, "Location's href: " + name) | ||
| 43 | + self.test(t => { | ||
| 44 | + const frame = document.body.appendChild(document.createElement("iframe")); | ||
| 45 | + t.add_cleanup(() => frame.remove()); | ||
| 46 | + assert_throws_dom("SyntaxError", frame.contentWindow.DOMException, () => frame.contentWindow.location = test.input); | ||
| 47 | + }, "Location's href: " + name); | ||
| 47 | 48 | ||
| 48 | 49 | self.test(() => { | |
| 49 | 50 | assert_throws_dom("SyntaxError", () => self.open(test.input).close()) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1592,6 +1592,17 @@ | |||
| 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,6 +1661,30 @@ | |||
| 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,5 +2240,15 @@ | |||
| 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 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -964,6 +964,11 @@ | |||
| 964 | 964 | "search": "", | |
| 965 | 965 | "hash": "" | |
| 966 | 966 | }, | |
| 967 | + { | ||
| 968 | + "input": "http://[::127.0.0.1.]", | ||
| 969 | + "base": "http://example.org/foo/bar", | ||
| 970 | + "failure": true | ||
| 971 | + }, | ||
| 967 | 972 | { | |
| 968 | 973 | "input": "http://[0:0:0:0:0:0:13.1.68.3]", | |
| 969 | 974 | "base": "http://example.org/foo/bar", | |
@@ -3959,11 +3964,21 @@ | |||
| 3959 | 3964 | "base": "http://other.com/", | |
| 3960 | 3965 | "failure": true | |
| 3961 | 3966 | }, | |
| 3967 | + { | ||
| 3968 | + "input": "http://[::.1.2]", | ||
| 3969 | + "base": "http://other.com/", | ||
| 3970 | + "failure": true | ||
| 3971 | + }, | ||
| 3962 | 3972 | { | |
| 3963 | 3973 | "input": "http://[::1.]", | |
| 3964 | 3974 | "base": "http://other.com/", | |
| 3965 | 3975 | "failure": true | |
| 3966 | 3976 | }, | |
| 3977 | + { | ||
| 3978 | + "input": "http://[::.1]", | ||
| 3979 | + "base": "http://other.com/", | ||
| 3980 | + "failure": true | ||
| 3981 | + }, | ||
| 3967 | 3982 | { | |
| 3968 | 3983 | "input": "http://[::%31]", | |
| 3969 | 3984 | "base": "http://other.com/", | |
@@ -8857,5 +8872,25 @@ | |||
| 8857 | 8872 | "protocol": "non-special:", | |
| 8858 | 8873 | "search": "", | |
| 8859 | 8874 | "username": "" | |
| 8875 | + }, | ||
| 8876 | + { | ||
| 8877 | + "input": "", | ||
| 8878 | + "base": "about:blank", | ||
| 8879 | + "failure": true | ||
| 8880 | + }, | ||
| 8881 | + { | ||
| 8882 | + "input": "https://example.com/\"quoted\"", | ||
| 8883 | + "base": "about:blank", | ||
| 8884 | + "hash": "", | ||
| 8885 | + "host": "example.com", | ||
| 8886 | + "hostname": "example.com", | ||
| 8887 | + "href": "https://example.com/%22quoted%22", | ||
| 8888 | + "origin": "https://example.com", | ||
| 8889 | + "password": "", | ||
| 8890 | + "pathname": "/%22quoted%22", | ||
| 8891 | + "port": "", | ||
| 8892 | + "protocol": "https:", | ||
| 8893 | + "search": "", | ||
| 8894 | + "username": "" | ||
| 8860 | 8895 | } | |
| 8861 | 8896 | ] | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,34 @@ | |||
| 1 | + test(() => { | ||
| 2 | + const params = new URLSearchParams("a=1&b=2&a=3"); | ||
| 3 | + assert_equals(params.size, 3); | ||
| 4 | + | ||
| 5 | + params.delete("a"); | ||
| 6 | + assert_equals(params.size, 1); | ||
| 7 | + }, "URLSearchParams's size and deletion"); | ||
| 8 | + | ||
| 9 | + test(() => { | ||
| 10 | + const params = new URLSearchParams("a=1&b=2&a=3"); | ||
| 11 | + assert_equals(params.size, 3); | ||
| 12 | + | ||
| 13 | + params.append("b", "4"); | ||
| 14 | + assert_equals(params.size, 4); | ||
| 15 | + }, "URLSearchParams's size and addition"); | ||
| 16 | + | ||
| 17 | + test(() => { | ||
| 18 | + const url = new URL("http://localhost/query?a=1&b=2&a=3"); | ||
| 19 | + assert_equals(url.searchParams.size, 3); | ||
| 20 | + | ||
| 21 | + url.searchParams.delete("a"); | ||
| 22 | + assert_equals(url.searchParams.size, 1); | ||
| 23 | + | ||
| 24 | + url.searchParams.append("b", 4); | ||
| 25 | + assert_equals(url.searchParams.size, 2); | ||
| 26 | + }, "URLSearchParams's size when obtained from a URL"); | ||
| 27 | + | ||
| 28 | + test(() => { | ||
| 29 | + const url = new URL("http://localhost/query?a=1&b=2&a=3"); | ||
| 30 | + assert_equals(url.searchParams.size, 3); | ||
| 31 | + | ||
| 32 | + url.search = "?"; | ||
| 33 | + assert_equals(url.searchParams.size, 0); | ||
| 34 | + }, "URLSearchParams's size when obtained from a URL and using .search"); | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -68,7 +68,7 @@ | |||
| 68 | 68 | "path": "streams" | |
| 69 | 69 | }, | |
| 70 | 70 | "url": { | |
| 71 | - "commit": "f1ade799d04b72b0ff75c13e988744c2cd873741", | ||
| 71 | + "commit": "1eaeb0e178b14078bd730ffecd62cb7569315523", | ||
| 72 | 72 | "path": "url" | |
| 73 | 73 | }, | |
| 74 | 74 | "user-timing": { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments