Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(189)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/forms/textarea/textarea-input-event.html

Issue 1522803002: Move textarea-related tests to fast/forms/textarea/, part 1. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@color-uaf
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698