blob: 2ff73fd5d72cb964f5b1eb767c21bb656551a4a4 [file] [log] [blame]
<!DOCTYPE html>
<script src=../resources/testharness.js></script>
<script src=../resources/testharnessreport.js></script>
<div id=aria-atomic></div>
<div id=alert-atomic></div>
<script>
// When a DOM node is reparented into a new document while waiting for a previously
// requesting computed accessible node, once the promise is resolved this could
// result in a crash.
alert_atomic = document.getElementById("alert-atomic");
promise_test(async function() {
var divElement = document.getElementById("aria-atomic");
var divCaxNode = await window.getComputedAccessibleNode(divElement);
var alertCaxNode = await window.getComputedAccessibleNode(alert_atomic);
}, "Reparenting a DOM node should not cause a crash.");
setTimeout(() => {
let doc = document.implementation.createDocument("", null);
doc.adoptNode(alert_atomic);
});
</script>