Skip to content

Commit c5b8b32

Browse files
committed
Bug 1941254 - fix and annotate known sanitizer api failures r=tschuster
Differential Revision: https://phabricator.services.mozilla.com/D234793
1 parent 288313a commit c5b8b32

File tree

6 files changed

+17
-13
lines changed

6 files changed

+17
-13
lines changed

testing/web-platform/meta/sanitizer-api/sethtml-safety.tentative.html.ini

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,9 @@
2727

2828
[Testcase #6, setHTML("<img src="https://example.com/test-image" onclick="2+2" one="two">)".]
2929
expected: FAIL
30+
31+
[Testcase #5, setHTML("<img src="https://web-platform.test/test-image" onclick="2+2" one="two">)".]
32+
expected: FAIL
33+
34+
[Testcase #6, setHTML("<img src="https://web-platform.test/test-image" onclick="2+2" one="two">)".]
35+
expected: FAIL

testing/web-platform/tests/sanitizer-api/sethtml-safety.dat renamed to testing/web-platform/tests/sanitizer-api/sethtml-safety.sub.dat

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,16 @@ script
3434
| "xxx"
3535

3636
#data
37-
<img src="https://example.com/test-image" onclick="2+2" one="two">
37+
<img src="https://{{host}}/test-image" onclick="2+2" one="two">
3838
#document
3939
| <img>
40-
| src="https://example.com/test-image"
40+
| src="https://{{host}}/test-image"
4141

4242
#data
43-
<img src="https://example.com/test-image" onclick="2+2" one="two">
43+
<img src="https://{{host}}/test-image" onclick="2+2" one="two">
4444
#config
4545
{ "attributes": ["src", "onclick", "one"]}
4646
#document
4747
| <img>
4848
| one="two"
49-
| src="https://example.com/test-image"
50-
49+
| src="https://{{host}}/test-image"

testing/web-platform/tests/sanitizer-api/sethtml-safety.tentative.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
<script src="support/html5lib-testcase-support.js"></script>
77
<script>
88
promise_test(async _ => {
9-
const safety = await fetch("sethtml-safety.dat").
9+
const safety = await fetch("sethtml-safety.sub.dat").
1010
then(response => response.text()).
1111
then(parse_html5lib_testcases);
12-
const unsafety = await fetch("sethtml-unsafety.dat").
12+
const unsafety = await fetch("sethtml-unsafety.sub.dat").
1313
then(response => response.text()).
1414
then(parse_html5lib_testcases);
1515

testing/web-platform/tests/sanitizer-api/sethtml-tree-construction.tentative.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// Testcases from the old(er) support/testcases.sub.js file, ported over to
1010
// the HTML5Lib testcase format.
1111
promise_test(_ => {
12-
return html5lib_testcases_from_response(fetch("sethtml-tree-construction.dat")).
12+
return html5lib_testcases_from_response(fetch("sethtml-tree-construction.sub.dat")).
1313
then(testcases => {
1414
testcases.forEach((testcase, index) => {
1515
test(_ => {

testing/web-platform/tests/sanitizer-api/sethtml-unsafety.dat renamed to testing/web-platform/tests/sanitizer-api/sethtml-unsafety.sub.dat

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,20 +42,19 @@ script
4242
| "xxx"
4343

4444
#data
45-
<img src="https://example.com/test-image" onclick="2+2" one="two">
45+
<img src="https://{{host}}/test-image" onclick="2+2" one="two">
4646
#document
4747
| <img>
4848
| onclick="2+2"
4949
| one="two"
50-
| src="https://example.com/test-image"
50+
| src="https://{{host}}/test-image"
5151

5252
#data
53-
<img src="https://example.com/test-image" onclick="2+2" one="two">
53+
<img src="https://{{host}}/test-image" onclick="2+2" one="two">
5454
#config
5555
{ "attributes": ["src", "onclick", "one"]}
5656
#document
5757
| <img>
5858
| onclick="2+2"
5959
| one="two"
60-
| src="https://example.com/test-image"
61-
60+
| src="https://{{host}}/test-image"

0 commit comments

Comments
 (0)