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"></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 ); | |
|
majidvp
2016/08/09 18:30:09
Why are we expecting two blocking touch handlers?
| |
| 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.'); | |
|
majidvp
2016/08/09 18:30:09
This test does not check pan-x, pan-y. Please upda
| |
| 13 | |
| 14 test(() => { | |
| 15 assert_equals(internals.touchActionType(document.getElementById('slider1')), ' pan-y'); | |
|
tkent
2016/08/09 00:29:46
Doesn't |getComputedStyle(document.getElementById(
| |
| 16 assert_equals(internals.touchActionType(document.getElementById('slider2')), ' pan-x'); | |
| 17 document.getElementById('slider1').style="-webkit-appearance: slider-vertical; "; | |
| 18 document.getElementById('slider2').style=""; | |
| 19 document.body.offsetTop; | |
|
majidvp
2016/08/09 18:30:09
How about wrapping document.body.offsetTop; in a |
| |
| 20 assert_equals(internals.touchActionType(document.getElementById('slider1')), ' pan-x'); | |
| 21 assert_equals(internals.touchActionType(document.getElementById('slider2')), ' pan-y'); | |
| 22 }, "Tests that each range input type has the correct pan-x or pan-y touch-action , and will update with the -webkit-appearance."); | |
| 23 | |
| 24 test(() => { | |
| 25 document.getElementById('slider1').style='touch-action:none;'; | |
| 26 document.body.offsetTop; | |
| 27 assert_equals(window.internals.touchActionType(document.getElementById('slider 1')), 'none'); | |
| 28 }, | |
| 29 'Tests that user-specified touch-action overrides the default touch-action.'); | |
| 30 </script> | |
| OLD | NEW |