Chromium Code Reviews| 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 UA style sheet excludes :root from the size- and position-related | |
| 9 * rules. To verify that none of them in fact apply, override the properties | |
| 10 * which would otherwise (incidentally) match the UA style sheet. */ | |
| 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 UA style sheet. | |
|
Julien - ping for review
2015/03/05 18:19:03
You probably meant the UA fullscreen style sheet.
philipj_slow
2015/03/06 02:43:40
I've disambiguated "UA style sheet" in all of the
| |
| 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 |