Revision ddcc729bca5abcc460db875952eb693b04fe2e41 authored by James Graham on 11 April 2018, 13:58:30 UTC, committed by jgraham on 11 April 2018, 16:48:12 UTC
This is required to pass the config into the wdspec tests.
1 parent a31d306
pointerevent_touch-action-verification.html
<!doctype html>
<html>
<head>
<title>touch-action: basic verification</title>
<meta name="assert" content="TA15.20 - The touch-action CSS property determines whether touch input MAY trigger default behavior supplied by the user agent.
auto: The user agent MAY determine any permitted touch behaviors, such as panning and zooming manipulations of the viewport, for touches that begin on the element.
none: Touches that begin on the element MUST NOT trigger default touch behaviors.
pan-x: The user agent MAY consider touches that begin on the element only for the purposes of horizontally scrolling the element's nearest ancestor with horizontally scrollable content.
pan-y: The user agent MAY consider touches that begin on the element only for the purposes of vertically scrolling the element's nearest ancestor with vertically scrollable content.
manipulation: The user agent MAY consider touches that begin on the element only for the purposes of scrolling and continuous zooming. Any additional behaviors supported by auto are out of scope for this specification.">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
/*
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 parsing behaviour of various touch-action combinations.</h4>
<script type='text/javascript'>
var detected_pointertypes = {};
setup({ explicit_done: true });
function run() {
var tests = document.querySelectorAll('.test');
//TA 15.20
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>
<h1>touch-action: basic verification</h1>
<div id="complete-notice">
<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-y" style="touch-action: pan-y;" expected="pan-y"></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-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>
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...