OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <title>'initial' and 'inherit' are invalid values for @viewport descriptors<
/title> | 4 <title>'initial' and 'inherit' are invalid values for @viewport descriptors<
/title> |
5 <script src="../../resources/testharness.js"></script> | 5 <script src="../../resources/testharness.js"></script> |
6 <script src="../../resources/testharnessreport.js"></script> | 6 <script src="../../resources/testharnessreport.js"></script> |
7 <script> | 7 <script> |
8 if (window.testRunner) { | 8 if (window.testRunner) { |
9 testRunner.enableFixedLayoutMode(true); | |
10 internals.settings.setViewportEnabled(true); | 9 internals.settings.setViewportEnabled(true); |
11 } | 10 } |
12 </script> | 11 </script> |
13 <style> | 12 <style> |
14 /* 'initial' and 'inherit' are invalid keywords for viewport descriptors
. */ | 13 /* 'initial' and 'inherit' are invalid keywords for viewport descriptors
. */ |
15 @viewport { min-width: initial; } | 14 @viewport { min-width: initial; } |
16 @viewport { min-width: inherit; } | 15 @viewport { min-width: inherit; } |
17 </style> | 16 </style> |
18 </head> | 17 </head> |
19 <body> | 18 <body> |
20 <div id="log"></div> | 19 <div id="log"></div> |
21 <script> | 20 <script> |
22 test(function(){ | 21 test(function(){ |
23 assert_equals(document.styleSheets[0].cssRules.length, 2); | 22 assert_equals(document.styleSheets[0].cssRules.length, 2); |
24 }, "Check that both @viewport rules are created."); | 23 }, "Check that both @viewport rules are created."); |
25 test(function(){ | 24 test(function(){ |
26 assert_equals(document.styleSheets[0].cssRules[0].style.length, 0); | 25 assert_equals(document.styleSheets[0].cssRules[0].style.length, 0); |
27 }, "Check that \"min-width: initial\" is dropped."); | 26 }, "Check that \"min-width: initial\" is dropped."); |
28 test(function(){ | 27 test(function(){ |
29 assert_equals(document.styleSheets[0].cssRules[0].style.length, 0); | 28 assert_equals(document.styleSheets[0].cssRules[0].style.length, 0); |
30 }, "Check that \"min-width: inherit\" is dropped."); | 29 }, "Check that \"min-width: inherit\" is dropped."); |
31 </script> | 30 </script> |
32 </body> | 31 </body> |
33 </html> | 32 </html> |
OLD | NEW |