diff --git a/sanitizer-api/sanitizer-custom-elements-is.tentative.html b/sanitizer-api/sanitizer-custom-elements-is.tentative.html new file mode 100644 index 00000000000000..62cf4e868709f1 --- /dev/null +++ b/sanitizer-api/sanitizer-custom-elements-is.tentative.html @@ -0,0 +1,95 @@ + + + + + + + + + + diff --git a/sanitizer-api/sanitizer-unknown.tentative.html b/sanitizer-api/sanitizer-unknown.tentative.html index 72f5418b914852..40ad2d4df6fb35 100644 --- a/sanitizer-api/sanitizer-unknown.tentative.html +++ b/sanitizer-api/sanitizer-unknown.tentative.html @@ -33,41 +33,6 @@ { sanitizer: { attributes: ["hello", "world"] } }); assert_equals(d.innerHTML, ``); }, "Unknown attribute names pass when allowed."); - -test(t => { - let d = document.createElement("div") - d.setHTML(`
hello
`); - assert_equals(d.innerHTML, `
hello
`); - assert_false(d.firstChild.hasAttribute("is")); - assert_true(d.firstChild.matches(":defined")); -}, "The is= attribute is removed by the default sanitizer config."); - -test(t => { - let d = document.createElement("div") - d.setHTML(`hello`); - assert_equals(d.innerHTML, `hello`); - assert_false(d.firstChild.hasAttribute("is")); - assert_true(d.firstChild.matches(":defined")); -}, "The is= attribute is removed from span by the default sanitizer config."); - - -test(t => { - let d = document.createElement("div") - d.setHTML(`
hello
`, - { sanitizer: { attributes: ["is"] } }); - assert_equals(d.innerHTML, `
hello
`); - assert_true(d.firstChild.hasAttribute("is")); - assert_false(d.firstChild.matches(":defined")); -}, "The is= attribute is kept when explicitly allowed."); - -test(t => { - let d = document.createElement("div") - d.setHTML(`
hello
`, - { sanitizer: { attributes: [] } }); - assert_equals(d.innerHTML, `
hello
`); - assert_false(d.firstChild.hasAttribute("is")); - assert_true(d.firstChild.matches(":defined")); -}, "The is= attribute gets blocked with a custom config.");