48 lines
1.1 KiB
HTML
48 lines
1.1 KiB
HTML
<html>
|
|
<head>
|
|
<script src="../../resources/js-test.js"></script>
|
|
</head>
|
|
|
|
<body id="body">
|
|
|
|
<input id="avnElement">
|
|
<input id="avnElement2">
|
|
|
|
<p>This tests that posting a notification for a deleted element does
|
|
not cause a crash.</p>
|
|
|
|
<p id="notDRT">This test should only be run inside of DumpRenderTree.</p>
|
|
|
|
<p id="console"></p>
|
|
|
|
<script>
|
|
function notificationReceived(event)
|
|
{
|
|
if (event != "value change event")
|
|
return;
|
|
|
|
debug("PASS: Didn't crash.");
|
|
finishJSTest();
|
|
}
|
|
if (window.testRunner && window.accessibilityController) {
|
|
document.getElementById("notDRT").style.visibility = "hidden";
|
|
|
|
jsTestIsAsync = true;
|
|
|
|
var element = document.getElementById("avnElement");
|
|
element.focus();
|
|
|
|
element.setAttribute("aria-valuenow", 2);
|
|
document.getElementById("body").removeChild(element);
|
|
|
|
var element2 = document.getElementById("avnElement2");
|
|
element2.focus();
|
|
|
|
accessibilityController.focusedElement.addNotificationListener(notificationReceived);
|
|
|
|
element2.setAttribute("aria-valuenow", 2);
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|