Tests/LibWeb: Add missing test resources for document.write WPT tests

This commit is contained in:
Shannon Booth 2025-02-08 12:29:44 +13:00 committed by Tim Flynn
commit e9181fcfd6
Notes: github-actions[bot] 2025-02-08 11:46:16 +00:00
11 changed files with 35 additions and 4 deletions

View file

@ -2,5 +2,5 @@ Harness status: OK
Found 1 tests Found 1 tests
1 Fail 1 Pass
Fail document.write external script Pass document.write external script

View file

@ -2,5 +2,5 @@ Harness status: OK
Found 1 tests Found 1 tests
1 Fail 1 Pass
Fail document.write external script that document.writes external script Pass document.write external script that document.writes external script

View file

@ -0,0 +1,3 @@
t.step(function() {
order.push(3);
});

View file

@ -0,0 +1,4 @@
t.step(function() {
order.push(4);
assert_equals(document.getElementsByTagName("meta").length, 1);
});

View file

@ -0,0 +1,4 @@
t.step(function() {
order.push(3);
assert_equals(document.getElementsByTagName("meta").length, 0);
});

View file

@ -0,0 +1,5 @@
t.step(function() {
order.push(4);
document.write("<meta>");
assert_equals(document.getElementsByTagName("meta").length, 1);
});

View file

@ -0,0 +1,5 @@
t.step(function() {
order.push(3);
document.write("<script src='011-1.js'></script" + "><meta>");
assert_equals(document.getElementsByTagName("meta").length, 0);
});

View file

@ -0,0 +1,5 @@
t.step(
function() {
order.push(5);
assert_equals(document.getElementsByTagName("meta").length, 0);
});

View file

@ -0,0 +1,3 @@
parent.order.push(3);
document.write("<script>parent.order.push(4)</script>");
parent.order.push(5);