Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <script src="../../../resources/testharness.js"></script> | |
| 3 <script src="../../../resources/testharnessreport.js"></script> | |
| 4 <div><input type="range" id="slider1" min="0" max="10" step="2" style="-webkit-a ppearance: media-slider;"></input></div> | |
| 5 <div><input type="range" id="slider2" min="0" max="10" step="2" style="-webkit-a ppearance: slider-vertical;"></div> | |
| 6 <script> | |
| 7 document.body.offsetTop; | |
| 8 test(() => { | |
| 9 assert_equals(internals.blockingTouchStartOrMoveEventHandlerCount(document), 2 ); | |
| 10 assert_equals(internals.passiveTouchStartOrMoveEventHandlerCount(document), 2) ; | |
| 11 }, | |
| 12 'Tests that each range input type has one passive touch handler and a pan-x or p an-y blocking touch handler.'); | |
| 13 | |
| 14 test(() => { | |
| 15 //assert_equals(internals.touchActionType(document.getElementById('slider1')), 'pan-y'); | |
| 16 assert_equals(getComputedStyle(document.getElementById('slider1')).touchAction , 'pan-y'); | |
| 17 assert_equals(getComputedStyle(document.getElementById('slider2')).touchAction , 'pan-x'); | |
| 18 document.getElementById('slider1').style="-webkit-appearance: slider-vertical; "; | |
| 19 document.getElementById('slider2').style=""; | |
| 20 document.body.offsetTop; | |
| 21 assert_equals(getComputedStyle(document.getElementById('slider1')).touchAction , 'pan-x'); | |
| 22 assert_equals(getComputedStyle(document.getElementById('slider2')).touchAction , 'pan-y'); | |
| 23 }, "Tests that each range input type has the correct pan-x or pan-y touch-action , and will update with the -webkit-appearance."); | |
| 24 | |
| 25 test(() => { | |
| 26 document.getElementById('slider1').style='touch-action:none;'; | |
| 27 document.body.offsetTop; | |
| 28 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
| |
| 29 }, | |
| 30 'Tests that user-specified touch-action overrides the default touch-action.'); | |
| 31 </script> | |
| OLD | NEW |