Files
ladybird/Tests/LibWeb/Text/input/DOM/window-open-and-reopen-custom-target.html
Timothy Flynn 4a8ef68b90 LibWeb: Protect against null navigables in lineage chain more thoroughly
This extends the null navigable check added in commit
b118c99c27 to include all ancestor and
descendant list lookups. Fixes a crash in the following WPT test:

/cookies/schemeful-same-site/schemeful-navigation.tentative.html
2026-02-08 14:51:25 -05:00

25 lines
610 B
HTML

<!DOCTYPE html>
<script src="../include.js"></script>
<script>
const runTest = id => {
return new Promise(resolve => {
window.onmessage = e => {
let target = window.open("", `test-${id}`);
println(`${id}: Target matches source: ${target === e.source}`);
e.source.close();
resolve();
};
window.open("../../data/window-opener-post-message.html", `test-${id}`);
});
};
asyncTest(async done => {
await runTest(1);
await runTest(2);
done();
});
</script>