OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <ol contenteditable oninput="document.body.innerHTML = observerRan ? 'FAILED' :
'PASSED'; if (window.testRunner) testRunner.notifyDone()"> | 2 <ol contenteditable oninput="document.body.innerHTML = observerRan ? 'FAILED' :
'PASSED'; if (window.testRunner) testRunner.notifyDone()"> |
3 <li>Press enter | 3 <li>Press enter |
4 </ol> | 4 </ol> |
5 <script> | 5 <script> |
6 if (window.testRunner) { | 6 if (window.testRunner) { |
7 testRunner.dumpAsText(); | 7 testRunner.dumpAsText(); |
8 testRunner.waitUntilDone(); | 8 testRunner.waitUntilDone(); |
9 } | 9 } |
10 | 10 |
11 var list = document.querySelector('ol'); | 11 var list = document.querySelector('ol'); |
12 var observerRan = false; | 12 var observerRan = false; |
13 var observer = new WebKitMutationObserver(function() { observerRan = true; }
); | 13 var observer = new MutationObserver(function() { observerRan = true; }); |
14 observer.observe(list, {childList: true, characterData: true}); | 14 observer.observe(list, {childList: true, characterData: true}); |
15 list.focus(); | 15 list.focus(); |
16 if (window.eventSender) | 16 if (window.eventSender) |
17 eventSender.scheduleAsynchronousKeyDown('\n'); | 17 eventSender.scheduleAsynchronousKeyDown('\n'); |
18 </script> | 18 </script> |
OLD | NEW |