From 4bc60b183bcefa71ee3166118106d869db161324 Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Sat, 21 Jan 2017 17:11:00 +0100 Subject: [PATCH] test state override --- url/setters_tests.json | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/url/setters_tests.json b/url/setters_tests.json index 054fff6fc342ae..bdb12a6ecf0150 100644 --- a/url/setters_tests.json +++ b/url/setters_tests.json @@ -1114,6 +1114,33 @@ "href": "http://example.net/%3F", "pathname": "/%3F" } + }, + { + "comment": "# needs to be encoded", + "href": "http://example.net", + "new_value": "#", + "expected": { + "href": "http://example.net/%23", + "pathname": "/%23" + } + }, + { + "comment": "? needs to be encoded, non-special scheme", + "href": "sc://example.net", + "new_value": "?", + "expected": { + "href": "sc://example.net/%3F", + "pathname": "/%3F" + } + }, + { + "comment": "# needs to be encoded, non-special scheme", + "href": "sc://example.net", + "new_value": "#", + "expected": { + "href": "sc://example.net/%23", + "pathname": "/%23" + } } ], "search": [