OLD | NEW |
1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../resources/js-test.js"></script> | 4 <script src="../../resources/js-test.js"></script> |
5 <style> | 5 <style> |
6 /* | 6 /* |
7 Give some rules below something to override in order to test | 7 Give some rules below something to override in order to test |
8 that they really are being parsed | 8 that they really are being parsed |
9 */ | 9 */ |
10 .defnone { | 10 .defnone { |
11 touch-action: none; | 11 touch-action: none; |
12 } | 12 } |
13 </style> | 13 </style> |
14 </head> | 14 </head> |
15 <body> | 15 <body> |
16 <p id="description"></p> | 16 <p id="description"></p> |
17 <div class="test" id="default" expected="auto"></div> | 17 <div class="test" id="default" expected="auto"></div> |
18 <div class="test defnone" id="stylesheet-none" expected="none"></div> | 18 <div class="test defnone" id="stylesheet-none" expected="none"></div> |
19 <div class="test defnone" id="explicit-auto" style="touch-action: auto;" expecte
d="auto"></div> | 19 <div class="test defnone" id="explicit-auto" style="touch-action: auto;" expecte
d="auto"></div> |
20 <div class="test" id="explicit-pan-x" style="touch-action: pan-x;" expected="pan
-x"></div> | 20 <div class="test" id="explicit-pan-x" style="touch-action: pan-x;" expected="pan
-x"></div> |
| 21 <div class="test" id="explicit-pan-left" style="touch-action: pan-left;" expecte
d="pan-left"></div> |
| 22 <div class="test" id="explicit-pan-right" style="touch-action: pan-right;" expec
ted="pan-right"></div> |
21 <div class="test" id="explicit-pan-y" style="touch-action: pan-y;" expected="pan
-y"></div> | 23 <div class="test" id="explicit-pan-y" style="touch-action: pan-y;" expected="pan
-y"></div> |
| 24 <div class="test" id="explicit-pan-up" style="touch-action: pan-up;" expected="p
an-up"></div> |
| 25 <div class="test" id="explicit-pan-down" style="touch-action: pan-down;" expecte
d="pan-down"></div> |
22 <div class="test" id="explicit-pan-x-pan-y" style="touch-action: pan-x pan-y;" e
xpected="pan-x pan-y"></div> | 26 <div class="test" id="explicit-pan-x-pan-y" style="touch-action: pan-x pan-y;" e
xpected="pan-x pan-y"></div> |
23 <div class="test" id="explicit-pan-y-pan-x" style="touch-action: pan-y pan-x;" e
xpected="pan-x pan-y"></div> | 27 <div class="test" id="explicit-pan-y-pan-x" style="touch-action: pan-y pan-x;" e
xpected="pan-x pan-y"></div> |
| 28 <div class="test" id="explicit-pan-left-pan-up" style="touch-action: pan-left pa
n-up;" expected="pan-left pan-up"></div> |
| 29 <div class="test" id="explicit-pan-left-pan-down" style="touch-action: pan-left
pan-down;" expected="pan-left pan-down"></div> |
| 30 <div class="test" id="explicit-pan-right-pan-up" style="touch-action: pan-right
pan-up;" expected="pan-right pan-up"></div> |
| 31 <div class="test" id="explicit-pan-right-pan-down" style="touch-action: pan-righ
t pan-down;" expected="pan-right pan-down"></div> |
| 32 <div class="test" id="explicit-pan-up-pan-left" style="touch-action: pan-up pan-
left;" expected="pan-left pan-up"></div> |
| 33 <div class="test" id="explicit-pan-up-pan-right" style="touch-action: pan-up pan
-right;" expected="pan-right pan-up"></div> |
| 34 <div class="test" id="explicit-pan-down-pan-left" style="touch-action: pan-down
pan-left;" expected="pan-left pan-down"></div> |
| 35 <div class="test" id="explicit-pan-down-pan-right" style="touch-action: pan-down
pan-right;" expected="pan-right pan-down"></div> |
24 <div class="test" id="explicit-manipulation" style="touch-action: manipulation;"
expected="manipulation"></div> | 36 <div class="test" id="explicit-manipulation" style="touch-action: manipulation;"
expected="manipulation"></div> |
25 <div class="test" id="explicit-none" style="touch-action: none;" expected="none"
></div> | 37 <div class="test" id="explicit-none" style="touch-action: none;" expected="none"
></div> |
26 <div class="test" id="explicit-invalid-1" style="touch-action: bogus;" expected=
"auto"></div> | 38 <div class="test" id="explicit-invalid-1" style="touch-action: bogus;" expected=
"auto"></div> |
27 <div class="test defnone" id="explicit-invalid-2" style="touch-action: auto pan-
x;" expected="none"></div> | 39 <div class="test defnone" id="explicit-invalid-2" style="touch-action: auto pan-
x;" expected="none"></div> |
28 <div class="test" id="explicit-invalid-3" style="touch-action: pan-y none;" expe
cted="auto"></div> | 40 <div class="test" id="explicit-invalid-3" style="touch-action: pan-y none;" expe
cted="auto"></div> |
29 <div class="test" id="explicit-invalid-4" style="touch-action: pan-x pan-x;" exp
ected="auto"></div> | 41 <div class="test" id="explicit-invalid-4" style="touch-action: pan-x pan-x;" exp
ected="auto"></div> |
30 <div class="test" id="explicit-invalid-5" style="touch-action: manipulation pan-
x;" expected="auto"></div> | 42 <div class="test" id="explicit-invalid-5" style="touch-action: manipulation pan-
x;" expected="auto"></div> |
| 43 <div class="test" id="explicit-invalid-6" style="touch-action: pan-x pan-left;"
expected="auto"></div> |
| 44 <div class="test" id="explicit-invalid-7" style="touch-action: auto pan-left;" e
xpected="auto"></div> |
| 45 <div class="test" id="explicit-invalid-8" style="touch-action: none pan-left;" e
xpected="auto"></div> |
| 46 <div class="test" id="explicit-invalid-9" style="touch-action: pan-x pan-right;"
expected="auto"></div> |
| 47 <div class="test" id="explicit-invalid-10" style="touch-action: pan-y pan-up;" e
xpected="auto"></div> |
| 48 <div class="test" id="explicit-invalid-11" style="touch-action: pan-y pan-down;"
expected="auto"></div> |
| 49 <div class="test" id="explicit-invalid-12" style="touch-action: pan-left pan-rig
ht;" expected="auto"></div> |
| 50 <div class="test" id="explicit-invalid-13" style="touch-action: pan-up pan-down;
" expected="auto"></div> |
31 <div style="touch-action: none;"> | 51 <div style="touch-action: none;"> |
32 <div class="test" id="not-inherited" expected="auto"></div> | 52 <div class="test" id="not-inherited" expected="auto"></div> |
33 <div class="test" id="inherit" style="touch-action: inherit;" expected="none">
</div> | 53 <div class="test" id="inherit" style="touch-action: inherit;" expected="none">
</div> |
34 </div> | 54 </div> |
35 <div class="test defnone" id="initial" style="touch-action: initial;" expected="
auto"></div> | 55 <div class="test defnone" id="initial" style="touch-action: initial;" expected="
auto"></div> |
36 | 56 |
37 <div id="console"></div> | 57 <div id="console"></div> |
38 <script> | 58 <script> |
39 description("Test the parsing and application of the touch-action property."); | 59 description("Test the parsing and application of the touch-action property."); |
40 | 60 |
41 var tests = document.querySelectorAll('.test'); | 61 var tests = document.querySelectorAll('.test'); |
42 var style; | 62 var style; |
43 for (var i = 0; i < tests.length; i++) { | 63 for (var i = 0; i < tests.length; i++) { |
44 debug('Test case: ' + tests[i].id); | 64 debug('Test case: ' + tests[i].id); |
45 style = window.getComputedStyle(tests[i]); | 65 style = window.getComputedStyle(tests[i]); |
46 shouldBeEqualToString('style.touchAction', tests[i].attributes.expected.value)
; | 66 shouldBeEqualToString('style.touchAction', tests[i].attributes.expected.value)
; |
47 debug(''); | 67 debug(''); |
48 } | 68 } |
49 | 69 |
50 successfullyParsed = true; | 70 successfullyParsed = true; |
51 </script> | 71 </script> |
52 </body> | 72 </body> |
53 </html> | 73 </html> |
OLD | NEW |