Skip to content

Commit 169f187

Browse files
watildeMylesBorins
authored andcommitted
test: synchronize WPT url setters tests data
Synchronize url-setter-test to upstream. Refs: web-platform-tests/wpt#5112 PR-URL: #11887 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Timothy Gu <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
1 parent c51d925 commit 169f187

File tree

1 file changed

+50
-1
lines changed

1 file changed

+50
-1
lines changed

test/fixtures/url-setter-tests.json

+50-1
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,55 @@
111111
"protocol": "http:"
112112
}
113113
},
114+
{
115+
"href": "gopher://example.net:1234",
116+
"new_value": "file",
117+
"expected": {
118+
"href": "gopher://example.net:1234/",
119+
"protocol": "gopher:"
120+
}
121+
},
122+
{
123+
"href": "wss://x:[email protected]:1234",
124+
"new_value": "file",
125+
"expected": {
126+
"href": "wss://x:[email protected]:1234/",
127+
"protocol": "wss:"
128+
}
129+
},
130+
{
131+
"comment": "Can’t switch from file URL with no host",
132+
"href": "file://localhost/",
133+
"new_value": "http",
134+
"expected": {
135+
"href": "file:///",
136+
"protocol": "file:"
137+
}
138+
},
139+
{
140+
"href": "file:///test",
141+
"new_value": "gopher",
142+
"expected": {
143+
"href": "file:///test",
144+
"protocol": "file:"
145+
}
146+
},
147+
{
148+
"href": "file:",
149+
"new_value": "wss",
150+
"expected": {
151+
"href": "file:///",
152+
"protocol": "file:"
153+
}
154+
},
155+
{
156+
"href": "file://hi/path",
157+
"new_value": "s",
158+
"expected": {
159+
"href": "file://hi/path",
160+
"protocol": "file:"
161+
}
162+
},
114163
{
115164
"href": "https://example.net",
116165
"new_value": "s",
@@ -1177,4 +1226,4 @@
11771226
}
11781227
}
11791228
]
1180-
}
1229+
}

0 commit comments

Comments
 (0)