Tests: Import a bunch of WPT tests related to dynamic markup insertion

This commit is contained in:
Andreas Kling 2024-11-23 18:22:17 +01:00 committed by Andreas Kling
parent e565e3c557
commit 701ed8470d
Notes: github-actions[bot] 2024-11-23 18:20:39 +00:00
148 changed files with 2062 additions and 0 deletions

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Pass
Details
Result Test Name MessagePass document.write

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Pass
Details
Result Test Name MessagePass document.write

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Fail
Details
Result Test Name MessageFail document.write

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Pass
Details
Result Test Name MessagePass document.write

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Pass
Details
Result Test Name MessagePass document.write

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Pass
Details
Result Test Name MessagePass document.write

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Fail
Details
Result Test Name MessageFail document.write

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Pass
Details
Result Test Name MessagePass document.write

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Pass
Details
Result Test Name MessagePass document.write

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Fail
Details
Result Test Name MessageFail document.write

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Fail
Details
Result Test Name MessageFail document.write

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Pass
Details
Result Test Name MessagePass document.write

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Pass
Details
Result Test Name MessagePass document.write

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Fail
Details
Result Test Name MessageFail document.write Cannot access property "firstChild" on null object "document.body"

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Fail
Details
Result Test Name MessageFail document.write

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Pass
Details
Result Test Name MessagePass document.write

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Fail
Details
Result Test Name MessageFail document.write

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Fail
Details
Result Test Name MessageFail document.write

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Pass
Details
Result Test Name MessagePass document.write

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Pass
Details
Result Test Name MessagePass document.write

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Pass
Details
Result Test Name MessagePass document.write

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Pass
Details
Result Test Name MessagePass document.write

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Pass
Details
Result Test Name MessagePass document.write

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Pass
Details
Result Test Name MessagePass document.write

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Pass
Details
Result Test Name MessagePass document.write

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Pass
Details
Result Test Name MessagePass document.write

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Pass
Details
Result Test Name MessagePass document.write

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Pass
Details
Result Test Name MessagePass document.write

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Pass
Details
Result Test Name MessagePass document.write

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Pass
Details
Result Test Name MessagePass document.write

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Pass
Details
Result Test Name MessagePass document.write

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Pass
Details
Result Test Name MessagePass document.write

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Fail
Details
Result Test Name MessageFail document.write

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Fail
Details
Result Test Name MessageFail document.write

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Fail
Details
Result Test Name MessageFail document.write

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Fail
Details
Result Test Name MessageFail document.write

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Fail
Details
Result Test Name MessageFail document.write

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Fail
Details
Result Test Name MessageFail document.write Cannot access property "childNodes" on null object "document.body"

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Fail
Details
Result Test Name MessageFail document.write

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Pass
Details
Result Test Name MessagePass document.write entity

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Fail
Details
Result Test Name MessageFail document.write entity

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Pass
Details
Result Test Name MessagePass document.write entity

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Pass
Details
Result Test Name MessagePass document.write entity

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Pass
Details
Result Test Name MessagePass document.write

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Fail
Details
Result Test Name MessageFail document.write

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Fail
Details
Result Test Name MessageFail document.write

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Fail
Details
Result Test Name MessageFail document.write plaintext

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Pass
Details
Result Test Name MessagePass document.write plaintext

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Fail
Details
Result Test Name MessageFail document.write \r\n

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Pass
Details
Result Test Name MessagePass document.write in XHTML

View file

@ -0,0 +1,13 @@
Summary
Harness status: OK
Rerun
Found 3 tests
3 Pass
Details
Result Test Name MessagePass Calling document.write with null and undefined
Pass document.write(null)
Pass document.write(undefined)

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Pass
Details
Result Test Name MessagePass document.write into iframe

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Fail
Details
Result Test Name MessageFail document.write into iframe

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Fail
Details
Result Test Name MessageFail document.write script into iframe

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Pass
Details
Result Test Name MessagePass document.write script into iframe write back into parent

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Fail
Details
Result Test Name MessageFail document.write external script into iframe write back into parent

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Pass
Details
Result Test Name MessagePass document.write external script into iframe write back into parent

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Pass
Details
Result Test Name MessagePass document.write comment into iframe

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Fail
Details
Result Test Name MessageFail document.write plaintext into iframe

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Fail
Details
Result Test Name MessageFail document.write plaintext into iframe

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Pass
Details
Result Test Name MessagePass document.write plaintext

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Pass
Details
Result Test Name MessagePass document.write script

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Pass
Details
Result Test Name MessagePass document.write script writing a further script

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Fail
Details
Result Test Name MessageFail document.write external script

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Fail
Details
Result Test Name MessageFail document.write external script followed by internal script

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Pass
Details
Result Test Name MessagePass document.write external script that document.writes inline script

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Fail
Details
Result Test Name MessageFail document.write external script that document.writes external script

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Fail
Details
Result Test Name MessageFail document.write external script tokenizer order

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Fail
Details
Result Test Name MessageFail document.write external script that document.writes external script

View file

@ -0,0 +1,11 @@
Summary
Harness status: OK
Rerun
Found 1 tests
1 Fail
Details
Result Test Name MessageFail document.write external script tokenizer order

View file

@ -0,0 +1,12 @@
<!doctype html>
<title>document.write</title>
<script src="../../../../resources/testharness.js"></script><script src="../../../../resources/testharnessreport.js"></script>
<script>
test(
function() {
document.write("PASS");
assert_equals(document.body.textContent, "PASS");
}
);
</script>
<div id="log"></div>

View file

@ -0,0 +1,13 @@
<!doctype html>
<title>document.write</title>
<script src="../../../../resources/testharness.js"></script><script src="../../../../resources/testharnessreport.js"></script>
<script>
test(
function() {
document.write("<i>Filler Text");
assert_equals(document.body.firstChild.localName, "i");
assert_equals(document.body.firstChild.textContent, "Filler Text");
}
);
</script>
<div id="log"></div>

View file

@ -0,0 +1,14 @@
<!doctype html>
<title>document.write</title>
<script src="../../../../resources/testharness.js"></script><script src="../../../../resources/testharnessreport.js"></script>
<script>
test(
function() {
document.write("<");
document.write("i>Filler Text");
assert_equals(document.body.firstChild.localName, "i");
assert_equals(document.body.firstChild.textContent, "Filler Text");
}
);
</script>
<div id="log"></div>

View file

@ -0,0 +1,14 @@
<!doctype html>
<title>document.write</title>
<script src="../../../../resources/testharness.js"></script><script src="../../../../resources/testharnessreport.js"></script>
<script>
test(
function() {
document.write("<i");
document.write(">Filler Text");
assert_equals(document.body.firstChild.localName, "i");
assert_equals(document.body.firstChild.textContent, "Filler Text");
}
);
</script>
<div id="log"></div>

View file

@ -0,0 +1,14 @@
<!doctype html>
<title>document.write</title>
<script src="../../../../resources/testharness.js"></script><script src="../../../../resources/testharnessreport.js"></script>
<script>
test(
function() {
document.write("<i>");
document.write("Filler Text");
assert_equals(document.body.firstChild.localName, "i");
assert_equals(document.body.firstChild.textContent, "Filler Text");
}
);
</script>
<div id="log"></div>

View file

@ -0,0 +1,14 @@
<!doctype html>
<title>document.write</title>
<script src="../../../../resources/testharness.js"></script><script src="../../../../resources/testharnessreport.js"></script>
<script>
test(
function() {
document.write("<i id='test'>Filler Text");
assert_equals(document.body.firstChild.localName, "i");
assert_equals(document.body.firstChild.getAttribute("id"), "test");
assert_equals(document.body.firstChild.textContent, "Filler Text");
}
);
</script>
<div id="log"></div>

View file

@ -0,0 +1,15 @@
<!doctype html>
<title>document.write</title>
<script src="../../../../resources/testharness.js"></script><script src="../../../../resources/testharnessreport.js"></script>
<script>
test(
function() {
document.write("<i ");
document.write("id='test'>Filler Text");
assert_equals(document.body.firstChild.localName, "i");
assert_equals(document.body.firstChild.getAttribute("id"), "test");
assert_equals(document.body.firstChild.textContent, "Filler Text");
}
);
</script>
<div id="log"></div>

View file

@ -0,0 +1,4 @@
t.step(function() {
order.push(2);
document.write("<script>t.step(function() {order.push(3)})</script>");
});

View file

@ -0,0 +1,15 @@
<!doctype html>
<title>document.write</title>
<script src="../../../../resources/testharness.js"></script><script src="../../../../resources/testharnessreport.js"></script>
<script>
test(
function() {
document.write("<i i");
document.write("d='test'>Filler Text");
assert_equals(document.body.firstChild.localName, "i");
assert_equals(document.body.firstChild.getAttribute("id"), "test");
assert_equals(document.body.firstChild.textContent, "Filler Text");
}
);
</script>
<div id="log"></div>

View file

@ -0,0 +1,4 @@
t.step(function() {
order.push(2);
document.write("<script src=\"008-1.js\"></script>");
});

View file

@ -0,0 +1,15 @@
<!doctype html>
<title>document.write</title>
<script src="../../../../resources/testharness.js"></script><script src="../../../../resources/testharnessreport.js"></script>
<script>
test(
function() {
document.write("<i id");
document.write("='test'>Filler Text");
assert_equals(document.body.firstChild.localName, "i");
assert_equals(document.body.firstChild.getAttribute("id"), "test");
assert_equals(document.body.firstChild.textContent, "Filler Text");
}
);
</script>
<div id="log"></div>

View file

@ -0,0 +1,15 @@
<!doctype html>
<title>document.write</title>
<script src="../../../../resources/testharness.js"></script><script src="../../../../resources/testharnessreport.js"></script>
<script>
test(
function() {
document.write("<i id=");
document.write("'test'>Filler Text");
assert_equals(document.body.firstChild.localName, "i");
assert_equals(document.body.firstChild.getAttribute("id"), "test");
assert_equals(document.body.firstChild.textContent, "Filler Text");
}
);
</script>
<div id="log"></div>

View file

@ -0,0 +1,15 @@
<!doctype html>
<title>document.write</title>
<script src="../../../../resources/testharness.js"></script><script src="../../../../resources/testharnessreport.js"></script>
<script>
test(
function() {
document.write("<i id='");
document.write("test'>Filler Text");
assert_equals(document.body.firstChild.localName, "i");
assert_equals(document.body.firstChild.getAttribute("id"), "test");
assert_equals(document.body.firstChild.textContent, "Filler Text");
}
);
</script>
<div id="log"></div>

View file

@ -0,0 +1,15 @@
<!doctype html>
<title>document.write</title>
<script src="../../../../resources/testharness.js"></script><script src="../../../../resources/testharnessreport.js"></script>
<script>
test(
function() {
document.write("<i id='te");
document.write("st'>Filler Text");
assert_equals(document.body.firstChild.localName, "i");
assert_equals(document.body.firstChild.getAttribute("id"), "test");
assert_equals(document.body.firstChild.textContent, "Filler Text");
}
);
</script>
<div id="log"></div>

View file

@ -0,0 +1,15 @@
<!doctype html>
<title>document.write</title>
<script src="../../../../resources/testharness.js"></script><script src="../../../../resources/testharnessreport.js"></script>
<script>
test(
function() {
document.write("<i id='test");
document.write("'>Filler Text");
assert_equals(document.body.firstChild.localName, "i");
assert_equals(document.body.firstChild.getAttribute("id"), "test");
assert_equals(document.body.firstChild.textContent, "Filler Text");
}
);
</script>
<div id="log"></div>

View file

@ -0,0 +1,15 @@
<!doctype html>
<title>document.write</title>
<script src="../../../../resources/testharness.js"></script><script src="../../../../resources/testharnessreport.js"></script>
<script>
test(
function() {
document.write("<i id='test'");
document.write(">Filler Text");
assert_equals(document.body.firstChild.localName, "i");
assert_equals(document.body.firstChild.getAttribute("id"), "test");
assert_equals(document.body.firstChild.textContent, "Filler Text");
}
);
</script>
<div id="log"></div>

View file

@ -0,0 +1,16 @@
<!doctype html>
<title>document.write</title>
<script src="../../../../resources/testharness.js"></script><script src="../../../../resources/testharnessreport.js"></script>
<script>
test(
function() {
document.write("<i id='test'");
document.write("class='a'>Filler Text");
assert_equals(document.body.firstChild.localName, "i");
assert_equals(document.body.firstChild.getAttribute("id"), "test");
assert_equals(document.body.firstChild.getAttribute("class"), "a");
assert_equals(document.body.firstChild.textContent, "Filler Text");
}
);
</script>
<div id="log"></div>

View file

@ -0,0 +1,16 @@
<!doctype html>
<title>document.write</title>
<script src="../../../../resources/testharness.js"></script><script src="../../../../resources/testharnessreport.js"></script>
<script>
test(
function() {
document.write("<i>Filler Text");
document.write("</i><b>Filler Text");
assert_equals(document.body.firstChild.localName, "i");
assert_equals(document.body.firstChild.textContent, "Filler Text");
assert_equals(document.body.childNodes[1].localName, "b");
assert_equals(document.body.childNodes[1].textContent, "Filler Text");
}
);
</script>
<div id="log"></div>

View file

@ -0,0 +1,19 @@
<!doctype html>
<title>document.write</title>
<script src="../../../../resources/testharness.js"></script><script src="../../../../resources/testharnessreport.js"></script>
<script>
test(
function() {
var s = "<i id=test>Filler Text</i><b>Filler Text"
for (var i=0; i<s.length; i++) {
document.write(s[i]);
}
assert_equals(document.body.firstChild.localName, "i");
assert_equals(document.body.firstChild.getAttribute('id'), "test");
assert_equals(document.body.firstChild.textContent, "Filler Text");
assert_equals(document.body.childNodes[1].localName, "b");
assert_equals(document.body.childNodes[1].textContent, "Filler Text");
}
);
</script>
<div id="log"></div>

View file

@ -0,0 +1,19 @@
<!doctype html>
<title>document.write</title>
<script src="../../../../resources/testharness.js"></script><script src="../../../../resources/testharnessreport.js"></script>
<script>
test(
function() {
document.write("<body>");
var s = "<!--comment--><i>Filler Text</i>"
for (var i=0; i<s.length; i++) {
document.write(s[i]);
}
assert_equals(document.body.firstChild.nodeType, document.COMMENT_NODE);
assert_equals(document.body.firstChild.data, "comment");
assert_equals(document.body.childNodes[1].localName, "i");
assert_equals(document.body.childNodes[1].textContent, "Filler Text");
}
);
</script>
<div id="log"></div>

View file

@ -0,0 +1,19 @@
<!doctype html>
<title>document.write</title>
<script src="../../../../resources/testharness.js"></script><script src="../../../../resources/testharnessreport.js"></script>
<script>
var t = async_test();
t.step(function() {
document.write("<i");
});
</script>
>Filler Text</i>
<script>
t.step(function() {
assert_equals(document.body.childNodes[0].localName, "i");
assert_equals(document.body.childNodes[0].textContent, "Filler Text");
}
);
t.done();
</script>
<div id="log"></div>

View file

@ -0,0 +1,18 @@
<!doctype html>
<title>document.write</title>
<script src="../../../../resources/testharness.js"></script><script src="../../../../resources/testharnessreport.js"></script>
<script>
var t = async_test();
t.step(function() {
document.write("<body><");
});
</script>!--comment-->
<script>
t.step(function() {
assert_equals(document.body.childNodes[0].nodeType, document.COMMENT_NODE);
assert_equals(document.body.childNodes[0].data, "comment");
}
);
t.done();
</script>
<div id="log"></div>

View file

@ -0,0 +1,18 @@
<!doctype html>
<title>document.write</title>
<script src="../../../../resources/testharness.js"></script><script src="../../../../resources/testharnessreport.js"></script>
<script>
var t = async_test();
t.step(function() {
document.write("<body><sp");
});
</script>an>Filler Text</span>
<script>
t.step(function() {
assert_equals(document.body.childNodes[0].localName, "span");
assert_equals(document.body.childNodes[0].textContent, "Filler Text");
}
);
t.done();
</script>
<div id="log"></div>

View file

@ -0,0 +1,18 @@
<!doctype html>
<title>document.write</title>
<script src="../../../../resources/testharness.js"></script><script src="../../../../resources/testharnessreport.js"></script>
<script>
var t = async_test();
t.step(function() {
document.write("<body><span>");
});
</script>Filler Text</span>
<script>
t.step(function() {
assert_equals(document.body.childNodes[0].localName, "span");
assert_equals(document.body.childNodes[0].textContent, "Filler Text");
}
);
t.done();
</script>
<div id="log"></div>

Some files were not shown because too many files have changed in this diff Show more