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

Unified Diff: third_party/WebKit/LayoutTests/imported/wpt/pointerevents/pointerevent_touch-action-verification.html

Issue 2303013002: Add UMA metric to track usage of sending a mousedown to select elements. (Closed)
Patch Set: W3C auto test import CL. Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/imported/wpt/pointerevents/pointerevent_touch-action-verification.html
diff --git a/third_party/WebKit/LayoutTests/imported/wpt/pointerevents/pointerevent_touch-action-verification.html b/third_party/WebKit/LayoutTests/imported/wpt/pointerevents/pointerevent_touch-action-verification.html
index 2e694229a215c8864817a6792e693ec4ef3de28e..7800f2c9da2245ea91ba77158f13d8f0c396f4a8 100644
--- a/third_party/WebKit/LayoutTests/imported/wpt/pointerevents/pointerevent_touch-action-verification.html
+++ b/third_party/WebKit/LayoutTests/imported/wpt/pointerevents/pointerevent_touch-action-verification.html
@@ -14,81 +14,32 @@
<script src="/resources/testharnessreport.js"></script>
<script src="pointerevent_support.js"></script>
<style>
- #target0 {
- width: 700px;
- height: 20px;
- touch-action: auto;
- }
- #target1 {
- width: 700px;
- height: 20px;
- touch-action: none;
- background: black;
- margin-top: 5px;
- touch-action: pan-x;
- }
- #target2 {
- width: 700px;
- height: 20px;
- touch-action: none;
- background: black;
- margin-top: 5px;
- touch-action: pan-y;
- }
- #target3 {
- width: 700px;
- height: 20px;
- touch-action: none;
- background: black;
- margin-top: 5px;
- touch-action: none;
- }
- #target4 {
- width: 700px;
- height: 20px;
- touch-action: none;
- background: black;
- margin-top: 5px;
- touch-action: manipulation;
- }
+ /*
+ Give some rules below something to override in order to test
+ that they really are being parsed
+ */
+ .defnone {
+ touch-action: none;
+ }
</style>
</head>
<body onload="run()">
<h2>Pointer Events touch-action attribute support</h2>
- <h4 id="desc">Test Description: Test will automatically check behaviour of following values: 'auto', 'pan-x', 'pan-y', ' none', 'manipulation'</h4>
- <div id="target0"></div>
- <div id="target1"></div>
- <div id="target2"></div>
- <div id="target3"></div>
- <div id="target4"></div>
+ <h4 id="desc">Test Description: Test will automatically check parsing behaviour of various touch-action combinations.</h4>
<script type='text/javascript'>
var detected_pointertypes = {};
setup({ explicit_done: true });
function run() {
- var target0 = document.getElementById('target0');
- var target1 = document.getElementById('target1');
- var target2 = document.getElementById('target2');
- var target3 = document.getElementById('target3');
- var target4 = document.getElementById('target4');
-
+ var tests = document.querySelectorAll('.test');
//TA 15.20
- test(function() {
- assert_true(getComputedStyle(target0).touchAction == 'auto', "'auto' is set properly");
- }, "'auto' is set properly");
- test(function() {
- assert_true(getComputedStyle(target1).touchAction == 'pan-x', "'pan-x' is corrected properly");
- }, "'pan-x' is corrected properly");
- test(function() {
- assert_true(getComputedStyle(target2).touchAction == 'pan-y', "'pan-y' is set properly");
- }, "'pan-y' is set properly");
- test(function() {
- assert_true(getComputedStyle(target3).touchAction == 'none', "'none' is set properly");
- }, "'none' is set properly");
- test(function() {
- assert_true(getComputedStyle(target4).touchAction == 'manipulation', "'manipulation' is set properly");
- }, "'manipulation' is set properly");
+ for (var i = 0; i < tests.length; i++) {
+ test(function() {
+ var style = window.getComputedStyle(tests[i]);
+ assert_equals(tests[i].attributes.expected.value, style.touchAction);
+ }, tests[i].id);
+ }
done();
}
</script>
@@ -97,5 +48,44 @@
<p>The following pointer types were detected: <span id="pointertype-log"></span>.</p>
</div>
<div id="log"></div>
+ <div class="test" id="default" expected="auto"></div>
+ <div class="test defnone" id="stylesheet-none" expected="none"></div>
+ <div class="test defnone" id="explicit-auto" style="touch-action: auto;" expected="auto"></div>
+ <div class="test" id="explicit-pan-x" style="touch-action: pan-x;" expected="pan-x"></div>
+ <div class="test" id="explicit-pan-left" style="touch-action: pan-left;" expected="pan-left"></div>
+ <div class="test" id="explicit-pan-right" style="touch-action: pan-right;" expected="pan-right"></div>
+ <div class="test" id="explicit-pan-y" style="touch-action: pan-y;" expected="pan-y"></div>
+ <div class="test" id="explicit-pan-up" style="touch-action: pan-up;" expected="pan-up"></div>
+ <div class="test" id="explicit-pan-down" style="touch-action: pan-down;" expected="pan-down"></div>
+ <div class="test" id="explicit-pan-x-pan-y" style="touch-action: pan-x pan-y;" expected="pan-x pan-y"></div>
+ <div class="test" id="explicit-pan-y-pan-x" style="touch-action: pan-y pan-x;" expected="pan-x pan-y"></div>
+ <div class="test" id="explicit-pan-left-pan-up" style="touch-action: pan-left pan-up;" expected="pan-left pan-up"></div>
+ <div class="test" id="explicit-pan-left-pan-down" style="touch-action: pan-left pan-down;" expected="pan-left pan-down"></div>
+ <div class="test" id="explicit-pan-right-pan-up" style="touch-action: pan-right pan-up;" expected="pan-right pan-up"></div>
+ <div class="test" id="explicit-pan-right-pan-down" style="touch-action: pan-right pan-down;" expected="pan-right pan-down"></div>
+ <div class="test" id="explicit-pan-up-pan-left" style="touch-action: pan-up pan-left;" expected="pan-left pan-up"></div>
+ <div class="test" id="explicit-pan-up-pan-right" style="touch-action: pan-up pan-right;" expected="pan-right pan-up"></div>
+ <div class="test" id="explicit-pan-down-pan-left" style="touch-action: pan-down pan-left;" expected="pan-left pan-down"></div>
+ <div class="test" id="explicit-pan-down-pan-right" style="touch-action: pan-down pan-right;" expected="pan-right pan-down"></div>
+ <div class="test" id="explicit-manipulation" style="touch-action: manipulation;" expected="manipulation"></div>
+ <div class="test" id="explicit-none" style="touch-action: none;" expected="none"></div>
+ <div class="test" id="explicit-invalid-1" style="touch-action: bogus;" expected="auto"></div>
+ <div class="test defnone" id="explicit-invalid-2" style="touch-action: auto pan-x;" expected="none"></div>
+ <div class="test" id="explicit-invalid-3" style="touch-action: pan-y none;" expected="auto"></div>
+ <div class="test" id="explicit-invalid-4" style="touch-action: pan-x pan-x;" expected="auto"></div>
+ <div class="test" id="explicit-invalid-5" style="touch-action: manipulation pan-x;" expected="auto"></div>
+ <div class="test" id="explicit-invalid-6" style="touch-action: pan-x pan-left;" expected="auto"></div>
+ <div class="test" id="explicit-invalid-7" style="touch-action: auto pan-left;" expected="auto"></div>
+ <div class="test" id="explicit-invalid-8" style="touch-action: none pan-left;" expected="auto"></div>
+ <div class="test" id="explicit-invalid-9" style="touch-action: pan-x pan-right;" expected="auto"></div>
+ <div class="test" id="explicit-invalid-10" style="touch-action: pan-y pan-up;" expected="auto"></div>
+ <div class="test" id="explicit-invalid-11" style="touch-action: pan-y pan-down;" expected="auto"></div>
+ <div class="test" id="explicit-invalid-12" style="touch-action: pan-left pan-right;" expected="auto"></div>
+ <div class="test" id="explicit-invalid-13" style="touch-action: pan-up pan-down;" expected="auto"></div>
+ <div style="touch-action: none;">
+ <div class="test" id="not-inherited" expected="auto"></div>
+ <div class="test" id="inherit" style="touch-action: inherit;" expected="none"></div>
+ </div>
+ <div class="test defnone" id="initial" style="touch-action: initial;" expected="auto"></div>
</body>
-</html>
+</html>

Powered by Google App Engine
This is Rietveld 408576698