| Index: LayoutTests/css3/device-adapt/viewport-cssom-01.html
|
| diff --git a/LayoutTests/css3/device-adapt/viewport-cssom-01.html b/LayoutTests/css3/device-adapt/viewport-cssom-01.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..5999c761807186fa5490ab30cace67989d763e77
|
| --- /dev/null
|
| +++ b/LayoutTests/css3/device-adapt/viewport-cssom-01.html
|
| @@ -0,0 +1,34 @@
|
| +<!DOCTYPE html>
|
| +<html>
|
| +<head>
|
| + <title>@viewport CSSOM - set descriptor values</title>
|
| + <script src="../../resources/testharness.js"></script>
|
| + <script src="../../resources/testharnessreport.js"></script>
|
| + <style>
|
| + @viewport {
|
| + width: 200px;
|
| + }
|
| + </style>
|
| +</head>
|
| +<body>
|
| + <div id="log"></div>
|
| + <script>
|
| + test(function(){
|
| + assert_equals(document.styleSheets[0].cssRules.length, 1, "Rule is found");
|
| + assert_equals(document.styleSheets[0].cssRules[0].type, CSSRule.VIEWPORT_RULE, "Rule is of type @viewport");
|
| + }, "@viewport rule exists");
|
| +
|
| + var rule = document.styleSheets[0].cssRules[0];
|
| +
|
| + test(function(){
|
| + rule.style.width = "400px";
|
| + assert_equals(rule.style.minWidth, "400px", "min-width is now 400px");
|
| + }, "Setting width shorthand sets min-width");
|
| +
|
| + test(function(){
|
| + rule.style.height = "900px";
|
| + assert_equals(rule.style.maxHeight, "900px", "max-height is now 900px");
|
| + }, "Setting height shorthand sets max-height");
|
| + </script>
|
| +</body>
|
| +</html>
|
|
|