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

Unified Diff: third_party/WebKit/LayoutTests/fast/events/touch/touch-action-range-input.html

Issue 2209773002: Remove the blocking touch handlers for the input[type=range] and add touch-action instead (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: style.. Created 4 years, 4 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
Index: third_party/WebKit/LayoutTests/fast/events/touch/touch-action-range-input.html
diff --git a/third_party/WebKit/LayoutTests/fast/events/touch/touch-action-range-input.html b/third_party/WebKit/LayoutTests/fast/events/touch/touch-action-range-input.html
new file mode 100644
index 0000000000000000000000000000000000000000..dae0a1faee63d25b25965485c0b53ea38598886b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/events/touch/touch-action-range-input.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<script src="../../../resources/testharness.js"></script>
+<script src="../../../resources/testharnessreport.js"></script>
+<div><input type="range" id="slider1" min="0" max="10" step="2"></input></div>
+<div><input type="range" id="slider2" min="0" max="10" step="2" style="-webkit-appearance: slider-vertical;"></div>
+<script>
+document.body.offsetTop;
+test(() => {
+ assert_equals(internals.blockingTouchStartOrMoveEventHandlerCount(document), 2);
majidvp 2016/08/09 18:30:09 Why are we expecting two blocking touch handlers?
+ assert_equals(internals.passiveTouchStartOrMoveEventHandlerCount(document), 2);
+},
+'Tests that each range input type has one passive touch handler and a pan-x or pan-y blocking touch handler.');
majidvp 2016/08/09 18:30:09 This test does not check pan-x, pan-y. Please upda
+
+test(() => {
+ assert_equals(internals.touchActionType(document.getElementById('slider1')), 'pan-y');
tkent 2016/08/09 00:29:46 Doesn't |getComputedStyle(document.getElementById(
+ assert_equals(internals.touchActionType(document.getElementById('slider2')), 'pan-x');
+ document.getElementById('slider1').style="-webkit-appearance: slider-vertical;";
+ document.getElementById('slider2').style="";
+ document.body.offsetTop;
majidvp 2016/08/09 18:30:09 How about wrapping document.body.offsetTop; in a |
+ assert_equals(internals.touchActionType(document.getElementById('slider1')), 'pan-x');
+ assert_equals(internals.touchActionType(document.getElementById('slider2')), 'pan-y');
+}, "Tests that each range input type has the correct pan-x or pan-y touch-action, and will update with the -webkit-appearance.");
+
+test(() => {
+ document.getElementById('slider1').style='touch-action:none;';
+ document.body.offsetTop;
+ assert_equals(window.internals.touchActionType(document.getElementById('slider1')), 'none');
+},
+'Tests that user-specified touch-action overrides the default touch-action.');
+</script>

Powered by Google App Engine
This is Rietveld 408576698