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

Side by Side Diff: LayoutTests/fast/css/touch-action-parsing.html

Issue 87973002: add pan-x and pan-y support to CSS touch-action parsing. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: merge to trunk Created 7 years 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
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 defnone" id="explicit-pan-x" style="touch-action: pan-x;" expec ted="pan-x"></div>
Rick Byers 2013/12/06 21:44:04 why use 'defnone' on these three tests? I'd just
gnana 2013/12/10 18:24:37 Done.
21 <div class="test defnone" id="explicit-pan-y" style="touch-action: pan-y;" expec ted="pan-y"></div>
22 <div class="test defnone" id="explicit-pan-x-pan-y" style="touch-action: pan-x p an-y;" expected="pan-x pan-y"></div>
Rick Byers 2013/12/06 21:44:04 it's probably worth adding 'pan-y pan-x'. I'm gue
gnana 2013/12/10 18:24:37 Done.
20 <div class="test" id="explicit-none" style="touch-action: none;" expected="none" ></div> 23 <div class="test" id="explicit-none" style="touch-action: none;" expected="none" ></div>
21 <div class="test" id="explicit-invalid" style="touch-action: bogus;" expected="a uto"></div> 24 <div class="test" id="explicit-invalid" style="touch-action: bogus;" expected="a uto"></div>
25 <div class="test" id="explicit-invalid" style="touch-action: auto pan-x;" expect ed="auto"></div>
Rick Byers 2013/12/06 21:44:04 it's illegal to use the same ID more than once - p
Rick Byers 2013/12/06 21:44:04 Apply the 'defnone' class here and expect it to be
gnana 2013/12/10 18:24:37 Done.
gnana 2013/12/10 18:24:37 Done.
26 <div class="test" id="explicit-invalid" style="touch-action: none pan-y;" expect ed="auto"></div>
Rick Byers 2013/12/06 21:44:04 just for a bit more variety, I'd suggest 'pan-y no
gnana 2013/12/10 18:24:37 Done.
22 <div style="touch-action: none;"> 27 <div style="touch-action: none;">
23 <div class="test" id="not-inherited" expected="auto"></div> 28 <div class="test" id="not-inherited" expected="auto"></div>
24 <div class="test" id="inherit" style="touch-action: inherit;" expected="none"> </div> 29 <div class="test" id="inherit" style="touch-action: inherit;" expected="none"> </div>
25 </div> 30 </div>
26 <div class="test defnone" id="initial" style="touch-action: initial;" expected=" auto"></div> 31 <div class="test defnone" id="initial" style="touch-action: initial;" expected=" auto"></div>
27 32
28 <div id="console"></div> 33 <div id="console"></div>
29 <script> 34 <script>
30 description("Test the parsing and application of the touch-action property."); 35 description("Test the parsing and application of the touch-action property.");
31 36
32 var tests = document.querySelectorAll('.test'); 37 var tests = document.querySelectorAll('.test');
33 var style; 38 var style;
34 for (var i = 0; i < tests.length; i++) { 39 for (var i = 0; i < tests.length; i++) {
35 debug('Test case: ' + tests[i].id); 40 debug('Test case: ' + tests[i].id);
36 style = window.getComputedStyle(tests[i]); 41 style = window.getComputedStyle(tests[i]);
37 shouldBeEqualToString('style.touchAction', tests[i].attributes.expected.value) ; 42 shouldBeEqualToString('style.touchAction', tests[i].attributes.expected.value) ;
38 debug(''); 43 debug('');
39 } 44 }
40 45
41 successfullyParsed = true; 46 successfullyParsed = true;
42 </script> 47 </script>
43 </body> 48 </body>
44 </html> 49 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/css/touch-action-parsing-expected.txt » ('j') | Source/core/css/CSSComputedStyleDeclaration.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698