File tree 3 files changed +37
-2
lines changed
html/browsers/history/the-location-interface
3 files changed +37
-2
lines changed Original file line number Diff line number Diff line change 20
20
assert_equals ( self [ index ] . location . protocol , "http:" ) ;
21
21
} ) ;
22
22
self [ index ] . location . protocol = val ;
23
- } , `Set location.protocol to ${ encodeURI ( val ) } (percent-encoded)` ) ;
23
+ } , `Set location.protocol to ${ encodeURI ( val ) } (percent-encoded here for clarity )` ) ;
24
24
} ) ;
25
25
}
26
26
</ script >
Original file line number Diff line number Diff line change 37
37
'\x01' ,
38
38
'\x09' , // becomes the empty string
39
39
'\x0A' , // becomes the empty string
40
+ '\x0C' ,
41
+ '\x0D' ,
40
42
'\x20' ,
41
43
'\x21' ,
42
44
'\x7F' ,
83
85
broken . forEach ( val => {
84
86
test ( ( ) => {
85
87
assert_throws_dom ( "SyntaxError" , ( ) => { location . protocol = val } )
86
- } , encodeURI ( val ) + " (percent-encoded) is not a scheme" )
88
+ } , ` ${ encodeURI ( val ) } (percent-encoded here for clarity ) is not a scheme` )
87
89
} )
88
90
let c = 0
89
91
async_test ( ( t ) => {
Original file line number Diff line number Diff line change 279
279
"protocol" : " https:" ,
280
280
"port" : " "
281
281
}
282
+ },
283
+ {
284
+ "comment" : " Non-tab/newline C0 controls result in no-op" ,
285
+ "href" : " http://test/" ,
286
+ "new_value" : " https\u0000 " ,
287
+ "expected" : {
288
+ "href" : " http://test/" ,
289
+ "protocol" : " http:"
290
+ }
291
+ },
292
+ {
293
+ "href" : " http://test/" ,
294
+ "new_value" : " https\u000C " ,
295
+ "expected" : {
296
+ "href" : " http://test/" ,
297
+ "protocol" : " http:"
298
+ }
299
+ },
300
+ {
301
+ "href" : " http://test/" ,
302
+ "new_value" : " https\u000D " ,
303
+ "expected" : {
304
+ "href" : " http://test/" ,
305
+ "protocol" : " http:"
306
+ }
307
+ },
308
+ {
309
+ "href" : " http://test/" ,
310
+ "new_value" : " https\u0020 " ,
311
+ "expected" : {
312
+ "href" : " http://test/" ,
313
+ "protocol" : " http:"
314
+ }
282
315
}
283
316
],
284
317
"username" : [
You can’t perform that action at this time.
0 commit comments