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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/forms/number/number-spinbutton-changeevent-trigger.html
diff --git a/LayoutTests/fast/forms/number/number-spinbutton-changeevent-trigger.html b/LayoutTests/fast/forms/number/number-spinbutton-changeevent-trigger.html
new file mode 100644
index 0000000000000000000000000000000000000000..918afe1d2bf7633ba8607d46123e8b64d9e62c7b
--- /dev/null
+++ b/LayoutTests/fast/forms/number/number-spinbutton-changeevent-trigger.html
@@ -0,0 +1,33 @@
+<!DOCTYPE>
+<html>
+<body>
+<script src="../../../resources/js-test.js"></script>
+<input type="number" id="num1" onchange="handleChangeEvent(this);" oninput="handleInputEvent(this);">
+<script>
+var changeEventCounter = 0;
+var inputEventCounter = 0;
+
+function handleChangeEvent(element){
+ ++changeEventCounter;
+}
+
+function handleInputEvent(element){
+ ++inputEventCounter;
+}
+
+var numberInput1= document.getElementById('num1');
+numberInput1.focus();
+eventSender.mouseMoveTo(0, 0);
+eventSender.mouseMoveTo(numberInput1.offsetLeft + numberInput1.offsetWidth - 10, numberInput1.offsetTop + numberInput1.offsetHeight / 4);
+eventSender.mouseDown();
+debug('Only input event occurs on mouse down');
+shouldBe('inputEventCounter', '1');
+shouldBe('changeEventCounter', '0');
+debug('Only change event occurs on mouse up');
+eventSender.mouseUp();
+shouldBe('inputEventCounter', '1');
+shouldBe('changeEventCounter', '1');
+
+</script>
+</body>
+</html>
« 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