Skip to content

Commit b999fdd

Browse files
committed
review
1 parent ec6d7d1 commit b999fdd

File tree

3 files changed

+37
-2
lines changed

3 files changed

+37
-2
lines changed

Diff for: html/browsers/history/the-location-interface/location-protocol-setter-sameish.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
assert_equals(self[index].location.protocol, "http:");
2121
});
2222
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)`);
2424
});
2525
}
2626
</script>

Diff for: html/browsers/history/the-location-interface/location-protocol-setter.html

+3-1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737
'\x01',
3838
'\x09', // becomes the empty string
3939
'\x0A', // becomes the empty string
40+
'\x0C',
41+
'\x0D',
4042
'\x20',
4143
'\x21',
4244
'\x7F',
@@ -83,7 +85,7 @@
8385
broken.forEach(val => {
8486
test(() => {
8587
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`)
8789
})
8890
let c = 0
8991
async_test((t) => {

Diff for: url/resources/setters_tests.json

+33
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,39 @@
279279
"protocol": "https:",
280280
"port": ""
281281
}
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+
}
282315
}
283316
],
284317
"username": [

0 commit comments

Comments
 (0)