Index: third_party/WebKit/LayoutTests/fast/css/usecounter-angle-zero-offset-rotate.html |
diff --git a/third_party/WebKit/LayoutTests/fast/css/usecounter-angle-zero-offset-rotate.html b/third_party/WebKit/LayoutTests/fast/css/usecounter-angle-zero-offset-rotate.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..5124238237b45b2a0714d58d44480719b0469276 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/fast/css/usecounter-angle-zero-offset-rotate.html |
@@ -0,0 +1,32 @@ |
+<!DOCTYPE html> |
+<script src="../../resources/testharness.js"></script> |
+<script src="../../resources/testharnessreport.js"></script> |
+<script> |
+'use strict'; |
+ |
+test(() => { |
+ let ZeroAngleOffsetRotate = 1980; // From UseCounter.h |
+ |
+ let isCounted = () => internals.isUseCounted(document, ZeroAngleOffsetRotate); |
+ var div = document.createElement('div'); |
+ |
+ // These values are invalid. |
+ div.style = 'image-orientation: 0;'; |
+ div.style = 'rotate: 0;'; |
+ div.style = 'offset-path: ray(0 closest-side);'; |
+ // These properties have their own counters. |
+ div.style = 'filter: hue-rotate(0);'; |
+ div.style = 'background-image: linear-gradient(0, red, black);'; |
+ div.style = 'transform: skewX(0);'; |
+ assert_false(isCounted(), |
+ 'non offset-rotate should not be counted'); |
+ |
+ div.style = 'offset-rotate: 0deg;'; |
+ assert_false(isCounted(), |
+ '0deg should not be counted'); |
+ |
+ div.style = 'offset-rotate: 0;'; |
+ assert_true(isCounted(), |
+ '0 should be counted'); |
+}, 'angle 0 is use counted for offset-rotate'); |
+</script> |