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> |