OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <script src="../../resources/testharness.js"></script> | |
3 <script src="../../resources/testharnessreport.js"></script> | |
4 | |
5 <style> | |
6 div { | |
7 padding-left: 100px; | |
8 padding-bottom: 100px; | |
9 color:green; | |
10 background-color: blue; | |
11 opacity: invalid value; | |
12 border: black solid 5px; | |
13 } | |
14 </style> | |
15 | |
16 <div id="target"></div> | |
17 | |
18 <script> | |
19 test(function() { | |
20 assert_true(internals.isCSSPropertyUseCounted(document, "color")); | |
21 assert_true(internals.isCSSPropertyUseCounted(document, "background-colo r")); | |
22 assert_true(internals.isCSSPropertyUseCounted(document, "padding-bottom" )); | |
23 assert_true(internals.isCSSPropertyUseCounted(document, "padding-left")) ; | |
24 }, "Test setting and reading css properties"); | |
25 | |
26 test(function() { | |
27 assert_true(internals.isCSSPropertyUseCounted(document, "border")) | |
28 assert_false(internals.isCSSPropertyUseCounted(document, "border-color") ); | |
Timothy Loh
2016/02/24 03:40:35
should also check a few props like border-left, bo
nainar
2016/02/24 04:29:53
Done.
| |
29 assert_false(internals.isCSSPropertyUseCounted(document, "border-style") ); | |
30 assert_false(internals.isCSSPropertyUseCounted(document, "border-width") ); | |
31 }, "Test setting a shorthand and reading longhand"); | |
32 | |
33 test(function() { | |
34 assert_false(internals.isCSSPropertyUseCounted(document, "opacity")); | |
35 }, "Test that properties with invalid values aren't counted"); | |
36 | |
37 test(function() { | |
38 assert_false(internals.isCSSPropertyUseCounted(document, "box-sizing")); | |
39 }, "Test that properties specified in UA stylesheet aren't counted"); | |
40 | |
41 </script> | |
OLD | NEW |