Index: third_party/WebKit/LayoutTests/fast/css/window-internals-isCSSPropertyUseCounted.html |
diff --git a/third_party/WebKit/LayoutTests/fast/css/window-internals-isCSSPropertyUseCounted.html b/third_party/WebKit/LayoutTests/fast/css/window-internals-isCSSPropertyUseCounted.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..8f098dff0b940e12d0c797eb519b5d5f324428f0 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/fast/css/window-internals-isCSSPropertyUseCounted.html |
@@ -0,0 +1,41 @@ |
+<!DOCTYPE html> |
+<script src="../../resources/testharness.js"></script> |
+<script src="../../resources/testharnessreport.js"></script> |
+ |
+<style> |
+div { |
+ padding-left: 100px; |
+ padding-bottom: 100px; |
+ color:green; |
+ background-color: blue; |
+ opacity: invalid value; |
+ border: black solid 5px; |
+} |
+</style> |
+ |
+<div id="target"></div> |
+ |
+<script> |
+test(function() { |
+ assert_true(internals.isCSSPropertyUseCounted(document, "color")); |
+ assert_true(internals.isCSSPropertyUseCounted(document, "background-color")); |
+ assert_true(internals.isCSSPropertyUseCounted(document, "padding-bottom")); |
+ assert_true(internals.isCSSPropertyUseCounted(document, "padding-left")); |
+}, "Test setting and reading css properties"); |
+ |
+test(function() { |
+ assert_true(internals.isCSSPropertyUseCounted(document, "border")) |
+ 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.
|
+ assert_false(internals.isCSSPropertyUseCounted(document, "border-style")); |
+ assert_false(internals.isCSSPropertyUseCounted(document, "border-width")); |
+}, "Test setting a shorthand and reading longhand"); |
+ |
+test(function() { |
+ assert_false(internals.isCSSPropertyUseCounted(document, "opacity")); |
+}, "Test that properties with invalid values aren't counted"); |
+ |
+test(function() { |
+ assert_false(internals.isCSSPropertyUseCounted(document, "box-sizing")); |
+}, "Test that properties specified in UA stylesheet aren't counted"); |
+ |
+</script> |