| Index: LayoutTests/fast/dom/shadow/shadow-selection-detach-crash.html
|
| diff --git a/LayoutTests/fast/dom/shadow/shadow-selection-detach-crash.html b/LayoutTests/fast/dom/shadow/shadow-selection-detach-crash.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..73f3c207e1ced40ad9a6e2e15e4a4b42bab308cd
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/dom/shadow/shadow-selection-detach-crash.html
|
| @@ -0,0 +1,26 @@
|
| +<!DOCTYPE html>
|
| +<script src="../../../resources/js-test.js"></script>
|
| +<output id="out"></output>
|
| +<script>
|
| +description("Garbage collection of Selection objects with shorter lifetimes must not crash.");
|
| +// A Selection object that dies before the window object it is registered to, must detach
|
| +// itself from its window on finalization.
|
| +
|
| +self.jsTestIsAsync = true;
|
| +if (window.testRunner) {
|
| + testRunner.dumpAsText();
|
| + testRunner.waitUntilDone();
|
| +}
|
| +
|
| +function runTest() {
|
| + var out = document.getElementById("out");
|
| + var root = out.createShadowRoot();
|
| + var sel = root.getSelection();
|
| + document.body.removeChild(out);
|
| + root = sel = out = null;
|
| + gc();
|
| + testPassed("No crash, including on shutdown..?");
|
| + finishJSTest();
|
| +}
|
| +window.onload = runTest;
|
| +</script>
|
|
|