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

Side by Side 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: Use better functions, structures and names 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 unified diff | Download patch
OLDNEW
(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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698