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

Unified Diff: LayoutTests/fast/forms/range/slider-onchange-event.html

Issue 234933002: Dispatch change event for Input type=range for touchEnd (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Code review changes Created 6 years, 8 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/range/slider-onchange-event-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/forms/range/slider-onchange-event.html
diff --git a/LayoutTests/fast/forms/range/slider-onchange-event.html b/LayoutTests/fast/forms/range/slider-onchange-event.html
index 3dc3ca1016fc865942c39b7dd589b57e4136104e..f382e7f948b6c0009d82152aedbc74a37a9e8316 100644
--- a/LayoutTests/fast/forms/range/slider-onchange-event.html
+++ b/LayoutTests/fast/forms/range/slider-onchange-event.html
@@ -24,13 +24,24 @@
eventSender.mouseMoveTo(slider.offsetLeft + 7, slider.offsetTop + 7);
eventSender.mouseDown();
eventSender.mouseUp();
+ // On touch events, check if change event is dispatched at touch end
+ var x = slider.offsetLeft;
+ var y = slider.offsetTop + slider.clientHeight / 2;
+ var w = slider.clientWidth;
+
+ eventSender.clearTouchPoints();
+ eventSender.addTouchPoint(x + w / 2, y);
+ eventSender.touchStart();
+ eventSender.touchMove();
+ eventSender.releaseTouchPoint(0);
+ eventSender.touchEnd();
}
}
</script>
</head>
<body onload="test()">
This tests that slider controls get the onchange event and that it is sent after the DOMInput event.<br>
- <input type="range" id="slider" onchange="log('change')" oninput="log('input')" value=0>
+ <input type="range" id="slider" onchange="log('change')" oninput="log('input')" value=0 width=200px height=300px>
<div id="res"></div>
</body>
</html>
« no previous file with comments | « no previous file | LayoutTests/fast/forms/range/slider-onchange-event-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698