1 <html> 2 <head> 3 <script src="../../../fast/js/resources/js-test-pre.js"></script> 4 </head> 5 6 <body id="body"> 7 8 <input id="avnElement"> 9 <input id="avnElement2"> 10 11 <p>This tests that posting a notification for a deleted element does 12 not cause a crash.</p> 13 14 <p id="notDRT">This test should only be run inside of DumpRenderTree.</p> 15 16 <p id="console"></p> 17 18 <script> 19 function notificationReceived(event) 20 { 21 if (event != "value change event") 22 return; 23 24 debug("PASS: Didn't crash."); 25 layoutTestController.notifyDone(); 26 } 27 if (window.layoutTestController && window.accessibilityController) { 28 document.getElementById("notDRT").style.visibility = "hidden"; 29 30 layoutTestController.dumpAsText(); 31 layoutTestController.waitUntilDone(); 32 33 var element = document.getElementById("avnElement"); 34 element.focus(); 35 36 element.setAttribute("aria-valuenow", 2); 37 document.getElementById("body").removeChild(element); 38 39 var element2 = document.getElementById("avnElement2"); 40 element2.focus(); 41 42 accessibilityController.focusedElement.addNotificationListener(notificationReceived); 43 44 element2.setAttribute("aria-valuenow", 2); 45 } 46 </script> 47 </body> 48 </html> 49