forked from web-platform-tests/wpt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[pointerevents] Serialization of touch-action (web-platform-tests#18439)
Tests that the CSS property touch-action supports each value specified in the spec, and serializes correctly. Tests that touch-action has initial value auto, and does not inherit. https://w3c.github.io/pointerevents/#the-touch-action-css-property
- Loading branch information
1 parent
888da5c
commit 85837ef
Showing
4 changed files
with
86 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Inheritance of touch-action</title> | ||
<link rel="help" href="https://w3c.github.io/pointerevents/#the-touch-action-css-property"> | ||
<meta name="assert" content="touch-action does not inherit."> | ||
<meta name="assert" content="touch-action initial value is auto."> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/css/support/inheritance-testcommon.js"></script> | ||
</head> | ||
<body> | ||
<div id="container"> | ||
<div id="target"></div> | ||
</div> | ||
<script> | ||
assert_not_inherited('touch-action', 'auto', 'none'); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Pointer Events: getComputedStyle().touchAction</title> | ||
<link rel="help" href="https://w3c.github.io/pointerevents/#the-touch-action-css-property"> | ||
<meta name="assert" content="touch-action computed value is as specified."> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/css/support/computed-testcommon.js"></script> | ||
</head> | ||
<body> | ||
<div id="target"></div> | ||
<script> | ||
test_computed_value("touch-action", "auto"); | ||
test_computed_value("touch-action", "none"); | ||
test_computed_value("touch-action", "manipulation"); | ||
|
||
test_computed_value("touch-action", "pan-x"); | ||
test_computed_value("touch-action", "pan-y"); | ||
test_computed_value("touch-action", "pan-x pan-y"); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Pointer Events: parsing touch-action with invalid values</title> | ||
<link rel="help" href="https://w3c.github.io/pointerevents/#the-touch-action-css-property"> | ||
<meta name="assert" content="touch-action supports only the grammar 'auto | none | [ pan-x || pan-y ] | manipulation'."> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/css/support/parsing-testcommon.js"></script> | ||
</head> | ||
<body> | ||
<script> | ||
test_invalid_value("touch-action", "auto none"); | ||
test_invalid_value("touch-action", "manipulation pan-x"); | ||
test_invalid_value("touch-action", "pan-y pan-x pan-y"); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Pointer Events: parsing touch-action with valid values</title> | ||
<link rel="help" href="https://w3c.github.io/pointerevents/#the-touch-action-css-property"> | ||
<meta name="assert" content="touch-action supports the full grammar 'auto | none | [ pan-x || pan-y ] | manipulation'."> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/css/support/parsing-testcommon.js"></script> | ||
</head> | ||
<body> | ||
<script> | ||
test_valid_value("touch-action", "auto"); | ||
test_valid_value("touch-action", "none"); | ||
test_valid_value("touch-action", "manipulation"); | ||
|
||
// [ pan-x || pan-y ] | ||
test_valid_value("touch-action", "pan-x"); | ||
test_valid_value("touch-action", "pan-y"); | ||
test_valid_value("touch-action", "pan-y pan-x", "pan-x pan-y"); | ||
</script> | ||
</body> | ||
</html> |