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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/usecounter-position3value-object-position.html

Issue 2888283006: CSS: Use count position values with 3 parts (Closed)
Patch Set: rebase Created 3 years, 6 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script>
4 <script>
5 'use strict';
6
7 test(() => {
8 let ThreeValuedPositionObjectPosition = 2004; // From UseCounter.h
9
10 let isCounted = () => internals.isUseCounted(document, ThreeValuedPositionOb jectPosition);
11 var div = document.createElement('div');
12
13 // These properties have their own counters.
14 div.style = 'background-position: left 10% top;';
15 div.style = 'shape-outside: circle(0px at left 10% top);';
16 div.style = 'background-image: radial-gradient(0em circle at left 10% top, y ellow, blue);';
17 div.style = 'perspective-origin: left 10% top;';
18 // These values are invalid.
19 div.style = 'offset-anchor: left 10% top;';
20 div.style = 'offset-position: left 10% top;';
21 div.style = 'transform-origin: left 10% top;';
22 // These obsolete properties will never ship.
23 div.style = 'scroll-snap-coordinate: left 10% top;';
24 div.style = 'scroll-snap-destination: left 10% top;';
25 assert_false(isCounted(),
26 'non object-position should not be counted');
27
28 div.style = 'object-position: left;';
29 div.style = 'object-position: left 10%;';
30 div.style = 'object-position: left 10% top 20%;';
31 assert_false(isCounted(),
32 '1,2,4 values should not be counted');
33
34 div.style = 'object-position: left 10% top;';
35 assert_true(isCounted(),
36 'object-position should be counted');
37 }, 'Three valued position syntax is use counted for object-position');
38 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698