Add crash test for disconnected frame switching to eager https://bugs.webkit.org/show_bug.cgi?id=245377 Reviewed by Ryosuke Niwa. Add crash test for disconnected frame switching to eager. * LayoutTests/fast/frames/disconnected-frame-set-to-eager-crash-expected.txt: Added. * LayoutTests/fast/frames/disconnected-frame-set-to-eager-crash.html: Added. Canonical link: https://commits.webkit.org/[email protected]
diff --git a/LayoutTests/fast/frames/disconnected-frame-set-to-eager-crash-expected.txt b/LayoutTests/fast/frames/disconnected-frame-set-to-eager-crash-expected.txt new file mode 100644 index 0000000..c2541f4 --- /dev/null +++ b/LayoutTests/fast/frames/disconnected-frame-set-to-eager-crash-expected.txt
@@ -0,0 +1 @@ +PASS if no crash.
diff --git a/LayoutTests/fast/frames/disconnected-frame-set-to-eager-crash.html b/LayoutTests/fast/frames/disconnected-frame-set-to-eager-crash.html new file mode 100644 index 0000000..51a89e5 --- /dev/null +++ b/LayoutTests/fast/frames/disconnected-frame-set-to-eager-crash.html
@@ -0,0 +1,18 @@ +<!DOCTYPE html> +<iframe id="iframe" loading="lazy"></iframe> +<script> + if (window.testRunner) { + testRunner.dumpAsText(); + testRunner.waitUntilDone(); + } + let iframe = document.getElementById("iframe"); + iframe.remove(); + iframe.setAttribute("loading", "eager"); + document.body.appendChild(iframe); + iframe.remove(); + requestAnimationFrame(() => { + document.body.innerHTML = "PASS if no crash."; + if (window.testRunner) + testRunner.notifyDone(); + }); +</script>