OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <title>User-agent level style sheet defaults for 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 /* Set properties which would otherwise match the UA style sheet. */ | |
9 margin: 10px; | |
10 min-width: 50%; | |
11 max-width: 50%; | |
12 min-height: 50%; | |
13 max-height: 50%; | |
14 transform: translate(0, 0); | |
15 } | |
16 </style> | |
17 <div id="log"></div> | |
18 <script> | |
19 async_test(function() | |
20 { | |
21 var root = document.documentElement; | |
22 assert_true(root.matches(":root")); | |
23 | |
24 document.addEventListener("fullscreenchange", this.step_func_done(function() | |
25 { | |
26 var style = getComputedStyle(root); | |
27 // No properties should match the UA style sheet. | |
Julien - ping for review
2015/03/04 01:07:37
I have no clue what this test is trying to do, nor
philipj_slow
2015/03/04 07:15:28
It's to verify that the :not(:root) bit is in the
Julien - ping for review
2015/03/04 17:50:22
Probably. I don't have a strong opinion on that ap
| |
28 assert_not_equals(style.position, "fixed"); | |
29 assert_not_equals(style.top, "0px"); | |
30 assert_not_equals(style.right, "0px"); | |
31 assert_not_equals(style.bottom, "0px"); | |
32 assert_not_equals(style.left, "0px"); | |
33 assert_not_equals(style.margin, "0px"); | |
34 assert_not_equals(style.boxSizing, "border-box"); | |
35 assert_not_equals(style.minWidth, "0px"); | |
36 assert_not_equals(style.maxWidth, "none"); | |
37 assert_not_equals(style.minHeight, "0px"); | |
38 assert_not_equals(style.maxHeight, "none"); | |
39 assert_equals(style.width, window.innerWidth / 2 + "px"); | |
40 assert_equals(style.height, window.innerHeight / 2 + "px"); | |
41 assert_not_equals(style.objectFit, "contain"); | |
42 assert_not_equals(style.flex, "0 0 auto"); | |
43 assert_not_equals(style.transform, "none"); | |
44 })); | |
45 | |
46 trusted_request(root, root); | |
47 }); | |
48 </script> | |
OLD | NEW |