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..3f4752ff7b38db72fecd17106021e93a392c2736 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/fast/css/usecounter-position3value-background.html |
@@ -0,0 +1,27 @@ |
+<!DOCTYPE html> |
+<script src="../../resources/testharness.js"></script> |
+<script src="../../resources/testharnessreport.js"></script> |
+<script> |
+'use strict'; |
+ |
+test(() => { |
+ let ThreeValuedPositionBackgroundPosition = 2001; // From UseCounter.h |
+ |
+ let isCounted = () => internals.isUseCounted(document, ThreeValuedPositionBackgroundPosition); |
+ var div = document.createElement('div'); |
+ |
+ // usecounter-position3value-background-position.html |
+ // tests that other position-using properties do not |
+ // increment the counter. |
+ |
+ 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> |