Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Unified Diff: third_party/WebKit/LayoutTests/fast/css/usecounter-position3value-conic-gradient.html

Issue 2888283006: CSS: Use count position values with 3 parts (Closed)
Patch Set: rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/fast/css/usecounter-position3value-conic-gradient.html
diff --git a/third_party/WebKit/LayoutTests/fast/css/usecounter-position3value-conic-gradient.html b/third_party/WebKit/LayoutTests/fast/css/usecounter-position3value-conic-gradient.html
new file mode 100644
index 0000000000000000000000000000000000000000..b98cd45a48f0b8e61aae529d15fbe4928d659221
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/css/usecounter-position3value-conic-gradient.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script>
+'use strict';
+
+test(() => {
+ let ThreeValuedPositionGradient = 2003; // From UseCounter.h
+
+ let isCounted = () => internals.isUseCounted(document, ThreeValuedPositionGradient);
+ var div = document.createElement('div');
+
+ // usecounter-position3value-radial-gradient.html
+ // tests that other position-using properties do not
+ // increment the counter.
+
+ div.style = 'background-image: conic-gradient(at left, black, red);';
+ div.style = 'background-image: conic-gradient(at left 10%, black, red);';
+ div.style = 'background-image: conic-gradient(at left 10% top 20%, black, red);';
+ assert_false(isCounted(),
+ '1,2,4 values should not be counted');
+
+ div.style = 'background-image: conic-gradient(at left 10% top, black, red);';
+ assert_true(isCounted(),
+ 'gradient should be counted');
+}, 'Three valued position syntax is use counted for conic-gradient');
+</script>

Powered by Google App Engine
This is Rietveld 408576698