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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/web-platform-tests/pointerevents/pointerevent_touch-action-verification.html

Issue 1984133002: Move web-platform-tests to wpt (part 2 of 2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 <html>
3 <head>
4 <title>touch-action: basic verification</title>
5 <meta name="assert" content="TA15.20 - The touch-action CSS property det ermines whether touch input MAY trigger default behavior supplied by the user ag ent.
6 auto: The user agent MAY determine any permitted touch behaviors, such a s panning and zooming manipulations of the viewport, for touches that begin on t he element.
7 none: Touches that begin on the element MUST NOT trigger default touch b ehaviors.
8 pan-x: The user agent MAY consider touches that begin on the element onl y for the purposes of horizontally scrolling the element's nearest ancestor with horizontally scrollable content.
9 pan-y: The user agent MAY consider touches that begin on the element onl y for the purposes of vertically scrolling the element's nearest ancestor with v ertically scrollable content.
10 manipulation: The user agent MAY consider touches that begin on the elem ent only for the purposes of scrolling and continuous zooming. Any additional be haviors supported by auto are out of scope for this specification.">
11 <meta name="viewport" content="width=device-width">
12 <link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
13 <script src="../../../resources/testharness.js"></script>
14 <script src="../../../resources/testharnessreport.js"></script>
15 <script src="pointerevent_support.js"></script>
16 <style>
17 #target0 {
18 width: 700px;
19 height: 20px;
20 touch-action: auto;
21 }
22 #target1 {
23 width: 700px;
24 height: 20px;
25 touch-action: none;
26 background: black;
27 margin-top: 5px;
28 touch-action: pan-x;
29 }
30 #target2 {
31 width: 700px;
32 height: 20px;
33 touch-action: none;
34 background: black;
35 margin-top: 5px;
36 touch-action: pan-y;
37 }
38 #target3 {
39 width: 700px;
40 height: 20px;
41 touch-action: none;
42 background: black;
43 margin-top: 5px;
44 touch-action: none;
45 }
46 #target4 {
47 width: 700px;
48 height: 20px;
49 touch-action: none;
50 background: black;
51 margin-top: 5px;
52 touch-action: manipulation;
53 }
54 </style>
55 </head>
56 <body onload="run()">
57 <h2>Pointer Events touch-action attribute support</h2>
58 <h4 id="desc">Test Description: Test will automatically check behaviour of following values: 'auto', 'pan-x', 'pan-y', ' none', 'manipulation'</h4>
59 <div id="target0"></div>
60 <div id="target1"></div>
61 <div id="target2"></div>
62 <div id="target3"></div>
63 <div id="target4"></div>
64 <script type='text/javascript'>
65 var detected_pointertypes = {};
66
67 setup({ explicit_done: true });
68
69 function run() {
70 var target0 = document.getElementById('target0');
71 var target1 = document.getElementById('target1');
72 var target2 = document.getElementById('target2');
73 var target3 = document.getElementById('target3');
74 var target4 = document.getElementById('target4');
75
76 //TA 15.20
77 test(function() {
78 assert_true(getComputedStyle(target0).touchAction == 'au to', "'auto' is set properly");
79 }, "'auto' is set properly");
80 test(function() {
81 assert_true(getComputedStyle(target1).touchAction == 'pa n-x', "'pan-x' is corrected properly");
82 }, "'pan-x' is corrected properly");
83 test(function() {
84 assert_true(getComputedStyle(target2).touchAction == 'pan-y' , "'pan-y' is set properly");
85 }, "'pan-y' is set properly");
86 test(function() {
87 assert_true(getComputedStyle(target3).touchAction == 'none', "'none' is set properly");
88 }, "'none' is set properly");
89 test(function() {
90 assert_true(getComputedStyle(target4).touchAction == 'manipu lation', "'manipulation' is set properly");
91 }, "'manipulation' is set properly");
92 done();
93 }
94 </script>
95 <h1>touch-action: basic verification</h1>
96 <div id="complete-notice">
97 <p>The following pointer types were detected: <span id="pointertype- log"></span>.</p>
98 </div>
99 <div id="log"></div>
100 </body>
101 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698