Chromium Code Reviews| Index: LayoutTests/fullscreen/rendering/ua-style-root.html |
| diff --git a/LayoutTests/fullscreen/rendering/ua-style-root.html b/LayoutTests/fullscreen/rendering/ua-style-root.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..33ac2fff70e368742234cc277e0f623d0215ec76 |
| --- /dev/null |
| +++ b/LayoutTests/fullscreen/rendering/ua-style-root.html |
| @@ -0,0 +1,50 @@ |
| +<!DOCTYPE html> |
| +<title>Override user-agent level style sheet defaults for the :root element</title> |
| +<script src="../../resources/testharness.js"></script> |
| +<script src="../../resources/testharnessreport.js"></script> |
| +<script src="../trusted-event.js"></script> |
| +<style> |
| +:root { |
| + /* The UA style sheet excludes :root from the size- and position-related |
| + * rules. To verify that none of them in fact apply, override the properties |
| + * which would otherwise (incidentally) match the UA style sheet. */ |
|
Julien - ping for review
2015/03/04 17:50:23
This should be in the dumped description (same gri
Julien - ping for review
2015/03/04 17:50:23
This should be in the dumped description (same gri
philipj_slow
2015/03/05 04:05:06
New test title is "Fullscreen UA style sheet does
|
| + margin: 10px; |
| + min-width: 50%; |
| + max-width: 50%; |
| + min-height: 50%; |
| + max-height: 50%; |
| + transform: translate(0, 0); |
| +} |
| +</style> |
| +<div id="log"></div> |
| +<script> |
| +async_test(function() |
| +{ |
| + var root = document.documentElement; |
| + assert_true(root.matches(":root")); |
| + |
| + document.addEventListener("fullscreenchange", this.step_func_done(function() |
| + { |
| + var style = getComputedStyle(root); |
| + // No properties should match the UA style sheet. |
| + assert_not_equals(style.position, "fixed"); |
| + assert_not_equals(style.top, "0px"); |
| + assert_not_equals(style.right, "0px"); |
| + assert_not_equals(style.bottom, "0px"); |
| + assert_not_equals(style.left, "0px"); |
| + assert_not_equals(style.margin, "0px"); |
| + assert_not_equals(style.boxSizing, "border-box"); |
| + assert_not_equals(style.minWidth, "0px"); |
| + assert_not_equals(style.maxWidth, "none"); |
| + assert_not_equals(style.minHeight, "0px"); |
| + assert_not_equals(style.maxHeight, "none"); |
| + assert_equals(style.width, window.innerWidth / 2 + "px"); |
| + assert_equals(style.height, window.innerHeight / 2 + "px"); |
|
Julien - ping for review
2015/03/04 17:50:23
You forgot to remove these 2 per your comment on p
|
| + assert_not_equals(style.objectFit, "contain"); |
| + assert_not_equals(style.flex, "0 0 auto"); |
| + assert_not_equals(style.transform, "none"); |
| + })); |
| + |
| + trusted_request(root, root); |
| +}); |
| +</script> |