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

Side by Side Diff: LayoutTests/fast/events/onchange-js.html

Issue 313013005: Set value of m_textAsOfLastFormControlChangeEvent before triggering change event (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Code review comments Created 6 years, 6 months 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
« no previous file with comments | « no previous file | LayoutTests/fast/events/onchange-js-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 </head>
6 <body>
7 <input id="input" type="text" onchange="changeHandler()">
8 <script>
9 description('This test verifies that the change event is fired, when value is ch anged in change event handler.');
10 var input = document.getElementById('input');
11 var changeEventCounter = 0;
12 function changeHandler()
13 {
14 changeEventCounter++;
15 input.value = '';
16 }
17
18 input.focus();
19 document.execCommand('InsertText', false, 'foo bar baz');
20 shouldBeEqualToString('input.value', 'foo bar baz');
21 input.blur();
22 shouldBe('changeEventCounter', '1');
23 shouldBeEqualToString('input.value', '');
24
25 input.focus();
26 document.execCommand('InsertText', false, 'foo bar baz');
27 shouldBeEqualToString('input.value', 'foo bar baz');
28 input.blur();
29 shouldBe('changeEventCounter', '2');
30 </script>
31 </body>
32 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/events/onchange-js-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698