1[url-setters.any.html]
2  [URL: Setting <http://test@example.net>.protocol = 'file' Can’t switch from URL containing username/password/port to file]
3    expected: FAIL
4
5  [URL: Setting <https://example.net:1234>.protocol = 'file']
6    expected: FAIL
7
8  [URL: Setting <wss://x:x@example.net:1234>.protocol = 'file']
9    expected: FAIL
10
11  [URL: Setting <file:///test>.protocol = 'https']
12    expected: FAIL
13
14  [URL: Setting <http://example.net>.protocol = 'b' Can’t switch from special scheme to non-special]
15    expected: FAIL
16
17  [URL: Setting <file://hi/path>.protocol = 's']
18    expected: FAIL
19
20  [URL: Setting <https://example.net>.protocol = 's']
21    expected: FAIL
22
23  [URL: Setting <ftp://example.net>.protocol = 'test']
24    expected: FAIL
25
26  [URL: Setting <mailto:me@example.net>.protocol = 'http' Cannot-be-a-base URL doesn’t have a host, but URL in a special scheme must.]
27    expected: FAIL
28
29  [URL: Setting <ssh://me@example.net>.protocol = 'http' Can’t switch from non-special scheme to special]
30    expected: FAIL
31
32  [URL: Setting <ssh://me@example.net>.protocol = 'https']
33    expected: FAIL
34
35  [URL: Setting <ssh://me@example.net>.protocol = 'file']
36    expected: FAIL
37
38  [URL: Setting <ssh://example.net>.protocol = 'file']
39    expected: FAIL
40
41  [URL: Setting <nonsense:///test>.protocol = 'https']
42    expected: FAIL
43
44  [URL: Setting <http://example.net>.username = '\x00\x01\t\n\r\x1f !"#$%&'()*+,-./09:;<=>?@AZ[\\\]^_`az{|}~€Éé' UTF-8 percent encoding with the userinfo encode set.]
45    expected: FAIL
46
47  [URL: Setting <javascript://x/>.username = 'wario']
48    expected: FAIL
49
50  [URL: Setting <file://test/>.username = 'test']
51    expected: FAIL
52
53  [URL: Setting <http://example.net>.password = '\x00\x01\t\n\r\x1f !"#$%&'()*+,-./09:;<=>?@AZ[\\\]^_`az{|}~€Éé' UTF-8 percent encoding with the userinfo encode set.]
54    expected: FAIL
55
56  [URL: Setting <javascript://x/>.password = 'bowser']
57    expected: FAIL
58
59  [URL: Setting <file://test/>.password = 'test']
60    expected: FAIL
61
62  [URL: Setting <sc://x/>.host = '\x00' Non-special scheme]
63    expected: FAIL
64
65  [URL: Setting <sc://x/>.host = '\t']
66    expected: FAIL
67
68  [URL: Setting <sc://x/>.host = '\n']
69    expected: FAIL
70
71  [URL: Setting <sc://x/>.host = '\r']
72    expected: FAIL
73
74  [URL: Setting <sc://x/>.host = ' ']
75    expected: FAIL
76
77  [URL: Setting <sc://x/>.host = '#']
78    expected: FAIL
79
80  [URL: Setting <sc://x/>.host = '/']
81    expected: FAIL
82
83  [URL: Setting <sc://x/>.host = '?']
84    expected: FAIL
85
86  [URL: Setting <sc://x/>.host = '@']
87    expected: FAIL
88
89  [URL: Setting <sc://x/>.host = 'ß']
90    expected: FAIL
91
92  [URL: Setting <view-source+http://example.net/foo>.host = '' The empty host is OK for non-special schemes]
93    expected: FAIL
94
95  [URL: Setting <a:/foo>.host = 'example.net' Path-only URLs can gain a host]
96    expected: FAIL
97
98  [URL: Setting <view-source+http://example.net/path>.host = 'example.com\\stuff' \\ is not a delimiter for non-special schemes, but still forbidden in hosts]
99    expected: FAIL
100
101  [URL: Setting <view-source+http://example.net/path>.host = 'example.com:8080stuff2' Anything other than ASCII digit stops the port parser in a setter but is not an error]
102    expected: FAIL
103
104  [URL: Setting <file://y/>.host = 'x:123']
105    expected: FAIL
106
107  [URL: Setting <sc://test@test/>.host = '']
108    expected: FAIL
109
110  [URL: Setting <sc://test:12/>.host = '']
111    expected: FAIL
112
113  [URL: Setting <sc://x/>.hostname = '\x00' Non-special scheme]
114    expected: FAIL
115
116  [URL: Setting <sc://x/>.hostname = '\t']
117    expected: FAIL
118
119  [URL: Setting <sc://x/>.hostname = '\n']
120    expected: FAIL
121
122  [URL: Setting <sc://x/>.hostname = '\r']
123    expected: FAIL
124
125  [URL: Setting <sc://x/>.hostname = ' ']
126    expected: FAIL
127
128  [URL: Setting <sc://x/>.hostname = '#']
129    expected: FAIL
130
131  [URL: Setting <sc://x/>.hostname = '/']
132    expected: FAIL
133
134  [URL: Setting <sc://x/>.hostname = '?']
135    expected: FAIL
136
137  [URL: Setting <sc://x/>.hostname = '@']
138    expected: FAIL
139
140  [URL: Setting <view-source+http://example.net/foo>.hostname = '' The empty host is OK for non-special schemes]
141    expected: FAIL
142
143  [URL: Setting <a:/foo>.hostname = 'example.net' Path-only URLs can gain a host]
144    expected: FAIL
145
146  [URL: Setting <view-source+http://example.net/path>.hostname = 'example.com\\stuff' \\ is not a delimiter for non-special schemes, but still forbidden in hosts]
147    expected: FAIL
148
149  [URL: Setting <file://y/>.hostname = 'x:123']
150    expected: FAIL
151
152  [URL: Setting <sc://test@test/>.hostname = '']
153    expected: FAIL
154
155  [URL: Setting <sc://test:12/>.hostname = '']
156    expected: FAIL
157
158  [URL: Setting <non-spec:/.//p>.hostname = 'h' Drop /. from path]
159    expected: FAIL
160
161  [URL: Setting <non-spec:/.//p>.hostname = '']
162    expected: FAIL
163
164  [URL: Setting <view-source+http://example.net/path>.port = '8080stuff2' Anything other than ASCII digit stops the port parser in a setter but is not an error]
165    expected: FAIL
166
167  [URL: Setting <non-special://example.net:8080/path>.port = '65536' Port numbers are 16 bit integers, overflowing is an error]
168    expected: FAIL
169
170  [URL: Setting <file://test/>.port = '12']
171    expected: FAIL
172
173  [URL: Setting <sc://x/>.port = '12']
174    expected: FAIL
175
176  [URL: Setting <javascript://x/>.port = '12']
177    expected: FAIL
178
179  [URL: Setting <unix:/run/foo.socket?timeout=10>.pathname = '/var/log/../run/bar.socket']
180    expected: FAIL
181
182  [URL: Setting <http://example.net/home?lang=fr#nav>.pathname = '\\a\\%2E\\b\\%2e.\\c' \\ is a segment delimiter for 'special' URLs]
183    expected: FAIL
184
185  [URL: Setting <view-source+http://example.net/home?lang=fr#nav>.pathname = '\\a\\%2E\\b\\%2e.\\c' \\ is *not* a segment delimiter for non-'special' URLs]
186    expected: FAIL
187
188  [URL: Setting <a:/>.pathname = '\x00\x01\t\n\r\x1f !"#$%&'()*+,-./09:;<=>?@AZ[\\\]^_`az{|}~€Éé' UTF-8 percent encoding with the default encode set. Tabs and newlines are removed.]
189    expected: FAIL
190
191  [URL: Setting <sc://example.net>.pathname = '?' ? needs to be encoded, non-special scheme]
192    expected: FAIL
193
194  [URL: Setting <sc://example.net>.pathname = '#' # needs to be encoded, non-special scheme]
195    expected: FAIL
196
197  [URL: Setting <file://monkey/>.pathname = '\\\\' File URLs and (back)slashes]
198    expected: FAIL
199
200  [URL: Setting <file:///unicorn>.pathname = '//\\/' File URLs and (back)slashes]
201    expected: FAIL
202
203  [URL: Setting <non-spec:/>.pathname = '/.//p' Serialize /. in path]
204    expected: FAIL
205
206  [URL: Setting <non-spec:/>.pathname = '/..//p']
207    expected: FAIL
208
209  [URL: Setting <non-spec:/>.pathname = '//p']
210    expected: FAIL
211
212  [URL: Setting <non-spec:/.//>.pathname = 'p' Drop /. from path]
213    expected: FAIL
214
215  [URL: Setting <a:/>.search = '\x00\x01\t\n\r\x1f !"#$%&'()*+,-./09:;<=>?@AZ[\\\]^_`az{|}~€Éé' UTF-8 percent encoding with the query encode set. Tabs and newlines are removed.]
216    expected: FAIL
217
218  [URL: Setting <a:/>.hash = '\x00\x01\t\n\r\x1f !"#$%&'()*+,-./09:;<=>?@AZ[\\\]^_`az{|}~€Éé' Simple percent-encoding; tabs and newlines are removed]
219    expected: FAIL
220
221  [URL: Setting <sc://example.com/>.host = '///bad.com' Leading / is not stripped]
222    expected: FAIL
223
224  [URL: Setting <sc://example.com/>.hostname = '///bad.com' Leading / is not stripped]
225    expected: FAIL
226
227  [URL: Setting <foo://somehost/some/path>.pathname = '' Non-special URLs can have their paths erased]
228    expected: FAIL
229
230  [URL: Setting <foo:///some/path>.pathname = '' Non-special URLs with an empty host can have their paths erased]
231    expected: FAIL
232
233  [URL: Setting <foo:/some/path>.pathname = '' Path-only URLs cannot have their paths erased]
234    expected: FAIL
235
236  [URL: Setting <foo:/some/path>.pathname = 'test' Path-only URLs always have an initial slash]
237    expected: FAIL
238
239
240[url-setters.any.worker.html]
241  [URL: Setting <http://test@example.net>.protocol = 'file' Can’t switch from URL containing username/password/port to file]
242    expected: FAIL
243
244  [URL: Setting <https://example.net:1234>.protocol = 'file']
245    expected: FAIL
246
247  [URL: Setting <wss://x:x@example.net:1234>.protocol = 'file']
248    expected: FAIL
249
250  [URL: Setting <file:///test>.protocol = 'https']
251    expected: FAIL
252
253  [URL: Setting <http://example.net>.protocol = 'b' Can’t switch from special scheme to non-special]
254    expected: FAIL
255
256  [URL: Setting <file://hi/path>.protocol = 's']
257    expected: FAIL
258
259  [URL: Setting <https://example.net>.protocol = 's']
260    expected: FAIL
261
262  [URL: Setting <ftp://example.net>.protocol = 'test']
263    expected: FAIL
264
265  [URL: Setting <mailto:me@example.net>.protocol = 'http' Cannot-be-a-base URL doesn’t have a host, but URL in a special scheme must.]
266    expected: FAIL
267
268  [URL: Setting <ssh://me@example.net>.protocol = 'http' Can’t switch from non-special scheme to special]
269    expected: FAIL
270
271  [URL: Setting <ssh://me@example.net>.protocol = 'https']
272    expected: FAIL
273
274  [URL: Setting <ssh://me@example.net>.protocol = 'file']
275    expected: FAIL
276
277  [URL: Setting <ssh://example.net>.protocol = 'file']
278    expected: FAIL
279
280  [URL: Setting <nonsense:///test>.protocol = 'https']
281    expected: FAIL
282
283  [URL: Setting <http://example.net>.username = '\x00\x01\t\n\r\x1f !"#$%&'()*+,-./09:;<=>?@AZ[\\\]^_`az{|}~€Éé' UTF-8 percent encoding with the userinfo encode set.]
284    expected: FAIL
285
286  [URL: Setting <javascript://x/>.username = 'wario']
287    expected: FAIL
288
289  [URL: Setting <file://test/>.username = 'test']
290    expected: FAIL
291
292  [URL: Setting <http://example.net>.password = '\x00\x01\t\n\r\x1f !"#$%&'()*+,-./09:;<=>?@AZ[\\\]^_`az{|}~€Éé' UTF-8 percent encoding with the userinfo encode set.]
293    expected: FAIL
294
295  [URL: Setting <javascript://x/>.password = 'bowser']
296    expected: FAIL
297
298  [URL: Setting <file://test/>.password = 'test']
299    expected: FAIL
300
301  [URL: Setting <sc://x/>.host = '\x00' Non-special scheme]
302    expected: FAIL
303
304  [URL: Setting <sc://x/>.host = '\t']
305    expected: FAIL
306
307  [URL: Setting <sc://x/>.host = '\n']
308    expected: FAIL
309
310  [URL: Setting <sc://x/>.host = '\r']
311    expected: FAIL
312
313  [URL: Setting <sc://x/>.host = ' ']
314    expected: FAIL
315
316  [URL: Setting <sc://x/>.host = '#']
317    expected: FAIL
318
319  [URL: Setting <sc://x/>.host = '/']
320    expected: FAIL
321
322  [URL: Setting <sc://x/>.host = '?']
323    expected: FAIL
324
325  [URL: Setting <sc://x/>.host = '@']
326    expected: FAIL
327
328  [URL: Setting <sc://x/>.host = 'ß']
329    expected: FAIL
330
331  [URL: Setting <view-source+http://example.net/foo>.host = '' The empty host is OK for non-special schemes]
332    expected: FAIL
333
334  [URL: Setting <a:/foo>.host = 'example.net' Path-only URLs can gain a host]
335    expected: FAIL
336
337  [URL: Setting <view-source+http://example.net/path>.host = 'example.com\\stuff' \\ is not a delimiter for non-special schemes, but still forbidden in hosts]
338    expected: FAIL
339
340  [URL: Setting <view-source+http://example.net/path>.host = 'example.com:8080stuff2' Anything other than ASCII digit stops the port parser in a setter but is not an error]
341    expected: FAIL
342
343  [URL: Setting <file://y/>.host = 'x:123']
344    expected: FAIL
345
346  [URL: Setting <sc://test@test/>.host = '']
347    expected: FAIL
348
349  [URL: Setting <sc://test:12/>.host = '']
350    expected: FAIL
351
352  [URL: Setting <sc://x/>.hostname = '\x00' Non-special scheme]
353    expected: FAIL
354
355  [URL: Setting <sc://x/>.hostname = '\t']
356    expected: FAIL
357
358  [URL: Setting <sc://x/>.hostname = '\n']
359    expected: FAIL
360
361  [URL: Setting <sc://x/>.hostname = '\r']
362    expected: FAIL
363
364  [URL: Setting <sc://x/>.hostname = ' ']
365    expected: FAIL
366
367  [URL: Setting <sc://x/>.hostname = '#']
368    expected: FAIL
369
370  [URL: Setting <sc://x/>.hostname = '/']
371    expected: FAIL
372
373  [URL: Setting <sc://x/>.hostname = '?']
374    expected: FAIL
375
376  [URL: Setting <sc://x/>.hostname = '@']
377    expected: FAIL
378
379  [URL: Setting <view-source+http://example.net/foo>.hostname = '' The empty host is OK for non-special schemes]
380    expected: FAIL
381
382  [URL: Setting <a:/foo>.hostname = 'example.net' Path-only URLs can gain a host]
383    expected: FAIL
384
385  [URL: Setting <view-source+http://example.net/path>.hostname = 'example.com\\stuff' \\ is not a delimiter for non-special schemes, but still forbidden in hosts]
386    expected: FAIL
387
388  [URL: Setting <file://y/>.hostname = 'x:123']
389    expected: FAIL
390
391  [URL: Setting <sc://test@test/>.hostname = '']
392    expected: FAIL
393
394  [URL: Setting <sc://test:12/>.hostname = '']
395    expected: FAIL
396
397  [URL: Setting <non-spec:/.//p>.hostname = 'h' Drop /. from path]
398    expected: FAIL
399
400  [URL: Setting <non-spec:/.//p>.hostname = '']
401    expected: FAIL
402
403  [URL: Setting <view-source+http://example.net/path>.port = '8080stuff2' Anything other than ASCII digit stops the port parser in a setter but is not an error]
404    expected: FAIL
405
406  [URL: Setting <non-special://example.net:8080/path>.port = '65536' Port numbers are 16 bit integers, overflowing is an error]
407    expected: FAIL
408
409  [URL: Setting <file://test/>.port = '12']
410    expected: FAIL
411
412  [URL: Setting <sc://x/>.port = '12']
413    expected: FAIL
414
415  [URL: Setting <javascript://x/>.port = '12']
416    expected: FAIL
417
418  [URL: Setting <unix:/run/foo.socket?timeout=10>.pathname = '/var/log/../run/bar.socket']
419    expected: FAIL
420
421  [URL: Setting <http://example.net/home?lang=fr#nav>.pathname = '\\a\\%2E\\b\\%2e.\\c' \\ is a segment delimiter for 'special' URLs]
422    expected: FAIL
423
424  [URL: Setting <view-source+http://example.net/home?lang=fr#nav>.pathname = '\\a\\%2E\\b\\%2e.\\c' \\ is *not* a segment delimiter for non-'special' URLs]
425    expected: FAIL
426
427  [URL: Setting <a:/>.pathname = '\x00\x01\t\n\r\x1f !"#$%&'()*+,-./09:;<=>?@AZ[\\\]^_`az{|}~€Éé' UTF-8 percent encoding with the default encode set. Tabs and newlines are removed.]
428    expected: FAIL
429
430  [URL: Setting <sc://example.net>.pathname = '?' ? needs to be encoded, non-special scheme]
431    expected: FAIL
432
433  [URL: Setting <sc://example.net>.pathname = '#' # needs to be encoded, non-special scheme]
434    expected: FAIL
435
436  [URL: Setting <file://monkey/>.pathname = '\\\\' File URLs and (back)slashes]
437    expected: FAIL
438
439  [URL: Setting <file:///unicorn>.pathname = '//\\/' File URLs and (back)slashes]
440    expected: FAIL
441
442  [URL: Setting <non-spec:/>.pathname = '/.//p' Serialize /. in path]
443    expected: FAIL
444
445  [URL: Setting <non-spec:/>.pathname = '/..//p']
446    expected: FAIL
447
448  [URL: Setting <non-spec:/>.pathname = '//p']
449    expected: FAIL
450
451  [URL: Setting <non-spec:/.//>.pathname = 'p' Drop /. from path]
452    expected: FAIL
453
454  [URL: Setting <a:/>.search = '\x00\x01\t\n\r\x1f !"#$%&'()*+,-./09:;<=>?@AZ[\\\]^_`az{|}~€Éé' UTF-8 percent encoding with the query encode set. Tabs and newlines are removed.]
455    expected: FAIL
456
457  [URL: Setting <a:/>.hash = '\x00\x01\t\n\r\x1f !"#$%&'()*+,-./09:;<=>?@AZ[\\\]^_`az{|}~€Éé' Simple percent-encoding; tabs and newlines are removed]
458    expected: FAIL
459
460  [URL: Setting <sc://example.com/>.host = '///bad.com' Leading / is not stripped]
461    expected: FAIL
462
463  [URL: Setting <sc://example.com/>.hostname = '///bad.com' Leading / is not stripped]
464    expected: FAIL
465
466  [URL: Setting <foo://somehost/some/path>.pathname = '' Non-special URLs can have their paths erased]
467    expected: FAIL
468
469  [URL: Setting <foo:///some/path>.pathname = '' Non-special URLs with an empty host can have their paths erased]
470    expected: FAIL
471
472  [URL: Setting <foo:/some/path>.pathname = '' Path-only URLs cannot have their paths erased]
473    expected: FAIL
474
475  [URL: Setting <foo:/some/path>.pathname = 'test' Path-only URLs always have an initial slash]
476    expected: FAIL
477