Chromium Code Reviews| 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..cdaedfbe6634ef2ad2928f2fe73da4d88dfe6a42 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/fast/css/window-internals-isCSSPropertyUseCounted.html |
| @@ -0,0 +1,37 @@ |
| +<!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: 100px; |
|
alancutter (OOO until 2018)
2016/02/24 02:45:52
We should make invalid values obvious e.g. "opacit
nainar
2016/02/24 03:34:25
Done.
|
| + border: black solid 5px; |
| +} |
| +</style> |
| + |
| +<div id="target"></div> |
| + |
| +<script> |
| +test(function() { |
| + assert_true(window.internals.isCSSPropertyUseCounted(document, "color")); |
|
alancutter (OOO until 2018)
2016/02/24 02:45:52
No need for "window.".
nainar
2016/02/24 03:34:25
Done.
|
| + assert_true(window.internals.isCSSPropertyUseCounted(document, "background-color")); |
| + assert_true(window.internals.isCSSPropertyUseCounted(document, "padding-bottom")); |
| + assert_true(window.internals.isCSSPropertyUseCounted(document, "padding-left")); |
| +}, "Test setting and reading css properties"); |
| + |
| +test(function() { |
| + assert_true(window.internals.isCSSPropertyUseCounted(document, "border")) |
| + assert_false(window.internals.isCSSPropertyUseCounted(document, "border-color")); |
| + assert_false(window.internals.isCSSPropertyUseCounted(document, "border-style")); |
| + assert_false(window.internals.isCSSPropertyUseCounted(document, "border-width")); |
| +}, "Test setting a shorthand and reading longhand"); |
| + |
| +test(function() { |
| + assert_false(window.internals.isCSSPropertyUseCounted(document, "opacity")); |
| +}, "Test windows.internal.isCSSPropertyUseCounted functionality - a property not set in author stylesheet should be false"); |
|
alancutter (OOO until 2018)
2016/02/24 02:45:52
This description is a bit weird, it's actually tes
nainar
2016/02/24 03:34:25
Done.
|
| + |
| +</script> |