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

Side by Side Diff: LayoutTests/css3/device-adapt/viewport-at-rule-parsing.html

Issue 15734030: Remove support for device-width|height for @viewport rule according to spec change (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Removed comment Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <style type="text/css"> 4 <style type="text/css">
5 /* Valid viewport syntax. */ 5 /* Valid viewport syntax. */
6 @viewport { 6 @viewport {
7 } 7 }
8 8
9 /* Valid viewport syntax, extras spaces should be ignored. */ 9 /* Valid viewport syntax, extras spaces should be ignored. */
10 @viewport { 10 @viewport {
(...skipping 27 matching lines...) Expand all
38 } 38 }
39 } 39 }
40 40
41 /* Rules inside a viewport should be ignored. */ 41 /* Rules inside a viewport should be ignored. */
42 @viewport { 42 @viewport {
43 max-height: 50px; 43 max-height: 50px;
44 min-height: 50px; 44 min-height: 50px;
45 45
46 @import url('../../resources/testharness.css'); 46 @import url('../../resources/testharness.css');
47 } 47 }
48
49 /* Should ignore unprefixed viewport rule. We need to change this
50 test if at some point we remove the prefix. */
51 @viewport {
52 }
53 </style> 48 </style>
54 <meta charset="utf-8" /> 49 <meta charset="utf-8" />
55 <link rel="help" href="http://www.w3.org/TR/css-device-adapt/#syntax" /> 50 <link rel="help" href="http://www.w3.org/TR/css-device-adapt/#syntax" />
56 <script src="../../resources/testharness.js"></script> 51 <script src="../../resources/testharness.js"></script>
57 <script src="../../resources/testharnessreport.js"></script> 52 <script src="../../resources/testharnessreport.js"></script>
58 <script type="text/javascript"> 53 <script type="text/javascript">
59 var rules = document.styleSheets[0].cssRules; 54 var rules = document.styleSheets[0].cssRules;
60 55
61 test(function() { 56 test(function() {
62 assert_equals(rules.item(0).cssText, "@viewport { }"); 57 assert_equals(rules.item(0).cssText, "@viewport { }");
(...skipping 15 matching lines...) Expand all
78 assert_equals(rules.item(4).cssText, "@media all { \n @viewport { } \n}"); 73 assert_equals(rules.item(4).cssText, "@media all { \n @viewport { } \n}");
79 }, "Should be accepted inside media queries"); 74 }, "Should be accepted inside media queries");
80 75
81 test(function() { 76 test(function() {
82 assert_equals(rules.item(5).cssText, "@viewport { max-height: 100px; min-height: 100px; }"); 77 assert_equals(rules.item(5).cssText, "@viewport { max-height: 100px; min-height: 100px; }");
83 }, "Nested viewport rule"); 78 }, "Nested viewport rule");
84 79
85 test(function() { 80 test(function() {
86 assert_equals(rules.item(6).cssText, "@viewport { max-height: 50px; min-height: 50px; }"); 81 assert_equals(rules.item(6).cssText, "@viewport { max-height: 50px; min-height: 50px; }");
87 }, "Rules inside a viewport rule"); 82 }, "Rules inside a viewport rule");
88
89 // The total number of parsed rules should be 6, meaning that the parser
90 // ignored the last two rules.
91 test(function() {
92 assert_equals(rules.length, 7)
93 }, "Should ignore unprefixed at-rule");
94 </script> 83 </script>
95 </head> 84 </head>
96 <body> 85 <body>
97 <div id="log"></div> 86 <div id="log"></div>
98 </body> 87 </body>
99 </html> 88 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698