Tests/LibWeb: Import WPT test for navigation cancel in document.open

This was recently implemented in: 76d9cc4baf
This commit is contained in:
Shannon Booth
2026-03-31 21:04:33 +02:00
committed by Alexander Kalenik
parent e20fd9ba74
commit a2aff98f07
Notes: github-actions[bot] 2026-04-01 02:42:14 +00:00
2 changed files with 23 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
<body>
<script src="../../../../resources/testharness.js"></script>
<script src="../../../../resources/testharnessreport.js"></script>
<script>
async_test(t => {
window.onload = t.step_func_done(() => assert_equals(i.contentDocument.body.innerText, "PASS"));
var i = document.createElement('iframe');
i.id ='i';
i.src = "javascript:'FAIL'";
document.body.appendChild(i);
i.contentDocument.open();
i.contentDocument.write("PASS")
i.contentDocument.close();
});
</script>
</body>