Chromium Code Reviews| 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..5df264364dc2f73abcaee5d22674338a648dd890 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/fast/events/touch/touch-action-range-input.html |
| @@ -0,0 +1,31 @@ |
| +<!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" style="-webkit-appearance: media-slider;"></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); |
| + 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.'); |
| + |
| +test(() => { |
| + //assert_equals(internals.touchActionType(document.getElementById('slider1')), 'pan-y'); |
| + assert_equals(getComputedStyle(document.getElementById('slider1')).touchAction, 'pan-y'); |
| + assert_equals(getComputedStyle(document.getElementById('slider2')).touchAction, 'pan-x'); |
| + document.getElementById('slider1').style="-webkit-appearance: slider-vertical;"; |
| + document.getElementById('slider2').style=""; |
| + document.body.offsetTop; |
| + assert_equals(getComputedStyle(document.getElementById('slider1')).touchAction, 'pan-x'); |
| + assert_equals(getComputedStyle(document.getElementById('slider2')).touchAction, '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(getComputedStyle(document.getElementById('slider1')).touchAction, 'none'); |
|
majidvp
2016/08/09 18:30:09
Hmmm, I don't think this verifies any logic that y
|
| +}, |
| +'Tests that user-specified touch-action overrides the default touch-action.'); |
| +</script> |