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

Side by Side Diff: LayoutTests/css3/device-adapt/viewport-cssom-01.html

Issue 22917005: New parser mode for CSSOM @viewport descriptors. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 4 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>@viewport CSSOM - set descriptor values</title>
5 <script src="../../resources/testharness.js"></script>
6 <script src="../../resources/testharnessreport.js"></script>
7 <style>
8 @viewport {
9 width: 200px;
10 }
11 </style>
12 </head>
13 <body>
14 <div id="log"></div>
15 <script>
16 test(function(){
17 assert_equals(document.styleSheets[0].cssRules.length, 1, "Rule is f ound");
18 assert_equals(document.styleSheets[0].cssRules[0].type, CSSRule.VIEW PORT_RULE, "Rule is of type @viewport");
19 }, "@viewport rule exists");
20
21 var rule = document.styleSheets[0].cssRules[0];
22
23 test(function(){
24 rule.style.width = "400px";
25 assert_equals(rule.style.minWidth, "400px", "min-width is now 400px" );
26 }, "Setting width shorthand sets min-width");
27
28 test(function(){
29 rule.style.height = "900px";
30 assert_equals(rule.style.maxHeight, "900px", "max-height is now 900p x");
31 }, "Setting height shorthand sets max-height");
32 </script>
33 </body>
34 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/css3/device-adapt/viewport-cssom-01-expected.txt » ('j') | Source/core/css/CSSParser-in.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698