| OLD | NEW |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <script src="../../../resources/js-test.js"></script> |
| 5 </head> |
| 6 <body> |
| 7 <p id="description"></p> |
| 8 <div id="console"></div> |
| 9 |
| 10 <div oninput="handleDivOnInput(event)"> |
| 11 <textarea id="ta">before</textarea> |
| 12 </div> |
| 13 |
| 14 <script> |
| 1 description('Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=15189">ht
tps://bugs.webkit.org/show_bug.cgi?id=15189</a><br>'); | 15 description('Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=15189">ht
tps://bugs.webkit.org/show_bug.cgi?id=15189</a><br>'); |
| 2 | 16 |
| 3 var handleTextareaOnInputCallCount = 0; | 17 var handleTextareaOnInputCallCount = 0; |
| 4 var handleDivOnInputCallCount = 0; | 18 var handleDivOnInputCallCount = 0; |
| 5 var successfullyParsed = false; | 19 var successfullyParsed = false; |
| 6 | 20 |
| 7 function handleDivOnInput(e) { | 21 function handleDivOnInput(e) { |
| 8 if (e.target !== ta) { | 22 if (e.target !== ta) { |
| 9 testFailed('Wrong target'); | 23 testFailed('Wrong target'); |
| 10 } else { | 24 } else { |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 shouldEvaluateTo('handleTextareaOnInputCallCount', 1); | 49 shouldEvaluateTo('handleTextareaOnInputCallCount', 1); |
| 36 shouldEvaluateTo('handleDivOnInputCallCount', 1); | 50 shouldEvaluateTo('handleDivOnInputCallCount', 1); |
| 37 | 51 |
| 38 // Change programmatically | 52 // Change programmatically |
| 39 ta.value = 'programmatically'; | 53 ta.value = 'programmatically'; |
| 40 | 54 |
| 41 // Should not have triggered the events. | 55 // Should not have triggered the events. |
| 42 shouldEvaluateTo('handleTextareaOnInputCallCount', 1); | 56 shouldEvaluateTo('handleTextareaOnInputCallCount', 1); |
| 43 shouldEvaluateTo('handleDivOnInputCallCount', 1); | 57 shouldEvaluateTo('handleDivOnInputCallCount', 1); |
| 44 } | 58 } |
| 59 </script> |
| 60 </body> |
| 61 </html> |
| OLD | NEW |