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

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

Issue 2888283006: CSS: Use count position values with 3 parts (Closed)
Patch Set: two color-stop for conic-gradient example 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-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>

Powered by Google App Engine
This is Rietveld 408576698