OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <title>Fullscreen UA style sheet does not apply to the :root element</title> |
| 3 <script src="../../resources/testharness.js"></script> |
| 4 <script src="../../resources/testharnessreport.js"></script> |
| 5 <script src="../trusted-event.js"></script> |
| 6 <style> |
| 7 :root { |
| 8 /* The Fullscreen UA style sheet excludes :root from the size- and |
| 9 * position-related rules. To verify that none of them in fact apply, |
| 10 * override the properties which would otherwise (incidentally) match. */ |
| 11 margin: 10px; |
| 12 min-width: 50%; |
| 13 max-width: 50%; |
| 14 min-height: 50%; |
| 15 max-height: 50%; |
| 16 transform: translate(0, 0); |
| 17 } |
| 18 </style> |
| 19 <div id="log"></div> |
| 20 <script> |
| 21 async_test(function() |
| 22 { |
| 23 var root = document.documentElement; |
| 24 assert_true(root.matches(":root")); |
| 25 |
| 26 document.addEventListener("fullscreenchange", this.step_func_done(function() |
| 27 { |
| 28 var style = getComputedStyle(root); |
| 29 // No properties should match the Fullscreen UA style sheet. |
| 30 assert_not_equals(style.position, "fixed"); |
| 31 assert_not_equals(style.top, "0px"); |
| 32 assert_not_equals(style.right, "0px"); |
| 33 assert_not_equals(style.bottom, "0px"); |
| 34 assert_not_equals(style.left, "0px"); |
| 35 assert_not_equals(style.margin, "0px"); |
| 36 assert_not_equals(style.boxSizing, "border-box"); |
| 37 assert_not_equals(style.minWidth, "0px"); |
| 38 assert_not_equals(style.maxWidth, "none"); |
| 39 assert_not_equals(style.minHeight, "0px"); |
| 40 assert_not_equals(style.maxHeight, "none"); |
| 41 assert_equals(style.width, window.innerWidth / 2 + "px"); |
| 42 assert_equals(style.height, window.innerHeight / 2 + "px"); |
| 43 assert_not_equals(style.objectFit, "contain"); |
| 44 assert_not_equals(style.transform, "none"); |
| 45 })); |
| 46 |
| 47 trusted_request(root, root); |
| 48 }); |
| 49 </script> |
OLD | NEW |