Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/fast/css/usecounter-position3value-background.html |
| diff --git a/third_party/WebKit/LayoutTests/fast/css/usecounter-position3value-background.html b/third_party/WebKit/LayoutTests/fast/css/usecounter-position3value-background.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..bbdcb83099f5af3ceb3aad4787d3920e4db77191 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/fast/css/usecounter-position3value-background.html |
| @@ -0,0 +1,23 @@ |
| +<!DOCTYPE html> |
| +<script src="../../resources/testharness.js"></script> |
| +<script src="../../resources/testharnessreport.js"></script> |
| +<script> |
| +'use strict'; |
| + |
| +test(() => { |
| + let ThreeValuedPositionBackgroundPosition = 1983; // From UseCounter.h |
|
Bugs Nash
2017/05/22 23:07:09
should this be named differently from UseCounter.h
Eric Willigers
2017/05/23 03:20:01
I have copied the convention from other use counte
|
| + |
| + let isCounted = () => internals.isUseCounted(document, ThreeValuedPositionBackgroundPosition); |
| + var div = document.createElement('div'); |
| + |
|
Bugs Nash
2017/05/22 23:07:09
some tests make sure that other properties with th
Eric Willigers
2017/05/23 03:20:01
Comments added. clearing the use counter is not po
|
| + div.style = 'background: left;'; |
| + div.style = 'background: left 10%;'; |
| + div.style = 'background: left 10% top 20%;'; |
| + assert_false(isCounted(), |
| + '1,2,4 values should not be counted'); |
| + |
| + div.style = 'background: left 10% top;'; |
| + assert_true(isCounted(), |
| + 'background should be counted'); |
| +}, 'Three valued position syntax is use counted for background'); |
| +</script> |