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

Side by Side Diff: LayoutTests/fast/forms/number/number-spinbutton-changeevent-trigger.html

Issue 128133002: Update of change event for input type number (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Code review changes Created 6 years, 11 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/forms/number/number-spinbutton-changeevent-trigger-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>
2 <html>
3 <body>
4 <script src="../../../resources/js-test.js"></script>
5 <input type="number" id="num1" onchange="handleChangeEvent(this);" oninput="hand leInputEvent(this);">
6 <script>
7 var changeEventCounter = 0;
8 var inputEventCounter = 0;
9
10 function handleChangeEvent(element){
11 ++changeEventCounter;
12 }
13
14 function handleInputEvent(element){
15 ++inputEventCounter;
16 }
17
18 var numberInput1= document.getElementById('num1');
19 numberInput1.focus();
20 eventSender.mouseMoveTo(0, 0);
21 eventSender.mouseMoveTo(numberInput1.offsetLeft + numberInput1.offsetWidth - 10, numberInput1.offsetTop + numberInput1.offsetHeight / 4);
22 eventSender.mouseDown();
23 debug('Only input event occurs on mouse down');
24 shouldBe('inputEventCounter', '1');
25 shouldBe('changeEventCounter', '0');
26 debug('Only change event occurs on mouse up');
27 eventSender.mouseUp();
28 shouldBe('inputEventCounter', '1');
29 shouldBe('changeEventCounter', '1');
30
31 </script>
32 </body>
33 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/forms/number/number-spinbutton-changeevent-trigger-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698