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

Side by Side Diff: LayoutTests/css3/device-adapt/viewport-properties-validation.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 with no properties. */ 5 /* Valid viewport syntax with no properties. */
6 @viewport { 6 @viewport {
7 } 7 }
8 8
9 /* Shorthands should be evaluated to the respective attributes. */ 9 /* Shorthands should be evaluated to the respective attributes. */
10 @viewport { 10 @viewport {
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 " orientation: auto;" + 151 " orientation: auto;" +
152 " user-zoom: zoom;" + 152 " user-zoom: zoom;" +
153 " zoom: auto; }"); 153 " zoom: auto; }");
154 }, "All valid properties with valid intial values"); 154 }, "All valid properties with valid intial values");
155 155
156 test(function() { 156 test(function() {
157 assert_equals(rules.item(5).cssText, 157 assert_equals(rules.item(5).cssText,
158 "@viewport {" + 158 "@viewport {" +
159 " min-width: 50%;" + 159 " min-width: 50%;" +
160 " max-width: 100px;" + 160 " max-width: 100px;" +
161 " min-height: device-width;" +
162 " max-height: device-height;" +
163 " min-zoom: 50%;" + 161 " min-zoom: 50%;" +
164 " max-zoom: 0.5;" + 162 " max-zoom: 0.5;" +
165 " orientation: landscape;" + 163 " orientation: landscape;" +
166 " user-zoom: fixed;" + 164 " user-zoom: fixed;" +
167 " zoom: 0.6; }"); 165 " zoom: 0.6; }");
168 }, "All valid properties with valid values"); 166 }, "All valid properties with valid values");
169 167
170 test(function() { 168 test(function() {
171 assert_equals(rules.item(6).cssText, "@viewport { }"); 169 assert_equals(rules.item(6).cssText, "@viewport { }");
172 }, "All valid properties with invalid intial values"); 170 }, "All valid properties with invalid intial values");
173 171
174 test(function() { 172 test(function() {
175 assert_equals(rules.item(7).cssText, "@viewport { }"); 173 assert_equals(rules.item(7).cssText, "@viewport { }");
176 }, "Negative numbers should be dropped on zoom attribute"); 174 }, "Negative numbers should be dropped on zoom attribute");
177 175
178 test(function() { 176 test(function() {
179 assert_equals(rules.item(8).cssText, ".foo { }"); 177 assert_equals(rules.item(8).cssText, ".foo { }");
180 }, "Viewport attributes inside selectors should be dropped"); 178 }, "Viewport attributes inside selectors should be dropped");
181 179
182 test(function() { 180 test(function() {
183 assert_equals(rules.item(9).cssText, 181 assert_equals(rules.item(9).cssText,
184 "@viewport {" + 182 "@viewport {" +
185 " min-width: device-width;" +
186 " max-width: device-height;" +
187 " min-height: 500px;" + 183 " min-height: 500px;" +
188 " max-height: 50%;" + 184 " max-height: 50%;" +
189 " min-zoom: 0.5;" + 185 " min-zoom: 0.5;" +
190 " max-zoom: 50%;" + 186 " max-zoom: 50%;" +
191 " orientation: portrait;" + 187 " orientation: portrait;" +
192 " user-zoom: zoom;" + 188 " user-zoom: zoom;" +
193 " zoom: 60%; }"); 189 " zoom: 60%; }");
194 }, "Invalid attributes among valid should be dropped"); 190 }, "Invalid attributes among valid should be dropped");
195 </script> 191 </script>
196 </head> 192 </head>
197 <body> 193 <body>
198 <div id="log"></div> 194 <div id="log"></div>
199 </body> 195 </body>
200 </html> 196 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698