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

Side by Side Diff: LayoutTests/fast/shapes/parsing/parsing-test-utils.js

Issue 185133006: [CSS Shapes] Serialize circle/ellipse positions (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix test expectation Created 6 years, 9 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
1 // Valid values for both shape-inside and shape-outside. Two values are specifie d when the shape property value 1 // Valid values for both shape-inside and shape-outside. Two values are specifie d when the shape property value
2 // differs from the specified value. Three values are specified when the compute d shape property value differs 2 // differs from the specified value. Three values are specified when the compute d shape property value differs
3 // from the specified value. 3 // from the specified value.
4 // eg: "specified value/CSS Text value/computed style value" 4 // eg: "specified value/CSS Text value/computed style value"
5 // or: ["specified value", "CSS Text value/computed style value"] 5 // or: ["specified value", "CSS Text value/computed style value"]
6 // or: ["specified value", "CSS Text value", "Computed style value"] 6 // or: ["specified value", "CSS Text value", "Computed style value"]
7 var validShapeValues = [ 7 var validShapeValues = [
8 "none", 8 "none",
9 ["rectangle(10px, 20px, 30px, 40px)", "rectangle(10px, 20px, 30px, 40px)", " rectangle(10px, 20px, 30px, 40px, 0px, 0px)"], 9 ["rectangle(10px, 20px, 30px, 40px)", "rectangle(10px, 20px, 30px, 40px)", " rectangle(10px, 20px, 30px, 40px, 0px, 0px)"],
10 ["rectangle(10px, 20px, 30px, 40px, 5px)", "rectangle(10px, 20px, 30px, 40px , 5px)", "rectangle(10px, 20px, 30px, 40px, 5px, 5px)"], 10 ["rectangle(10px, 20px, 30px, 40px, 5px)", "rectangle(10px, 20px, 30px, 40px , 5px)", "rectangle(10px, 20px, 30px, 40px, 5px, 5px)"],
(...skipping 24 matching lines...) Expand all
35 ["inset(10px round 9px 8px 7px / 6px 5px 4px 3px)", "inset(10px 10px 10px 10 px round 9px 8px 7px 8px / 6px 5px 4px 3px)", "inset(10px 10px 10px 10px round 9 px 8px 7px 8px / 6px 5px 4px 3px)"], 35 ["inset(10px round 9px 8px 7px / 6px 5px 4px 3px)", "inset(10px 10px 10px 10 px round 9px 8px 7px 8px / 6px 5px 4px 3px)", "inset(10px 10px 10px 10px round 9 px 8px 7px 8px / 6px 5px 4px 3px)"],
36 ["inset(10px round 9px 8px 7px 6px / 5px)", "inset(10px 10px 10px 10px round 9px 8px 7px 6px / 5px 5px 5px 5px)", "inset(10px 10px 10px 10px round 9px 8px 7 px 6px / 5px 5px 5px 5px)"], 36 ["inset(10px round 9px 8px 7px 6px / 5px)", "inset(10px 10px 10px 10px round 9px 8px 7px 6px / 5px 5px 5px 5px)", "inset(10px 10px 10px 10px round 9px 8px 7 px 6px / 5px 5px 5px 5px)"],
37 ["inset(10px round 9px 8px 7px 6px / 5px 4px)", "inset(10px 10px 10px 10px r ound 9px 8px 7px 6px / 5px 4px 5px 4px)", "inset(10px 10px 10px 10px round 9px 8 px 7px 6px / 5px 4px 5px 4px)"], 37 ["inset(10px round 9px 8px 7px 6px / 5px 4px)", "inset(10px 10px 10px 10px r ound 9px 8px 7px 6px / 5px 4px 5px 4px)", "inset(10px 10px 10px 10px round 9px 8 px 7px 6px / 5px 4px 5px 4px)"],
38 ["inset(10px round 9px 8px 7px 6px / 5px 4px 3px)", "inset(10px 10px 10px 10 px round 9px 8px 7px 6px / 5px 4px 3px 4px)", "inset(10px 10px 10px 10px round 9 px 8px 7px 6px / 5px 4px 3px 4px)"], 38 ["inset(10px round 9px 8px 7px 6px / 5px 4px 3px)", "inset(10px 10px 10px 10 px round 9px 8px 7px 6px / 5px 4px 3px 4px)", "inset(10px 10px 10px 10px round 9 px 8px 7px 6px / 5px 4px 3px 4px)"],
39 ["inset(10px round 9px 8px 7px 6px / 5px 4px 3px 2px)", "inset(10px 10px 10p x 10px round 9px 8px 7px 6px / 5px 4px 3px 2px)", "inset(10px 10px 10px 10px rou nd 9px 8px 7px 6px / 5px 4px 3px 2px)"], 39 ["inset(10px round 9px 8px 7px 6px / 5px 4px 3px 2px)", "inset(10px 10px 10p x 10px round 9px 8px 7px 6px / 5px 4px 3px 2px)", "inset(10px 10px 10px 10px rou nd 9px 8px 7px 6px / 5px 4px 3px 2px)"],
40 ["inset(10px 20px 30px 40px round 5px 6px)", "inset(10px 20px 30px 40px roun d 5px 6px 5px 6px / 5px 6px 5px 6px)", "inset(10px 20px 30px 40px round 5px 6px 5px 6px / 5px 6px 5px 6px)"], 40 ["inset(10px 20px 30px 40px round 5px 6px)", "inset(10px 20px 30px 40px roun d 5px 6px 5px 6px / 5px 6px 5px 6px)", "inset(10px 20px 30px 40px round 5px 6px 5px 6px / 5px 6px 5px 6px)"],
41 "inset(10px 20px 30px 40px round 5px 6px 7px 8px / 50px 60px 70px 80px)", 41 "inset(10px 20px 30px 40px round 5px 6px 7px 8px / 50px 60px 70px 80px)",
42 42
43 "circle(10px, 20px, 30px)", // FIXME: Remove this test once we do not suppor t the deprecated CSS Shapes syntax anymore. 43 "circle(10px, 20px, 30px)", // FIXME: Remove this test once we do not suppor t the deprecated CSS Shapes syntax anymore.
44 44
45 ["circle()", "circle()", "circle(closest-side at 50% 50%)"], 45 ["circle()", "circle(at 50% 50%)", "circle(closest-side at 50% 50%)"],
46 ["circle(farthest-side)", "circle(farthest-side)", "circle(farthest-side at 50% 50%)"], 46 ["circle(farthest-side)", "circle(farthest-side at 50% 50%)"],
47 ["circle(closest-side)", "circle(closest-side)", "circle(closest-side at 50% 50%)"], 47 ["circle(closest-side)", "circle(closest-side at 50% 50%)"],
48 ["circle(10px)", "circle(10px)", "circle(10px at 50% 50%)"], 48 ["circle(10px)", "circle(10px at 50% 50%)"],
49 ["circle(10px at 10px)", "circle(10px at 10px 50%)"], 49 ["circle(10px at 10px)", "circle(10px at 10px 50%)"],
50 "circle(10px at 10px 10px)", 50 "circle(10px at 10px 10px)",
51 ["circle(at 10px)", "circle(at 10px 50%)", "circle(closest-side at 10px 50%) "], 51 ["circle(at 10px)", "circle(at 10px 50%)", "circle(closest-side at 10px 50%) "],
52 ["circle(at 10px 10px)", "circle(at 10px 10px)", "circle(closest-side at 10p x 10px)"], 52 ["circle(at 10px 10px)", "circle(at 10px 10px)", "circle(closest-side at 10p x 10px)"],
53 ["circle(at top left)", "circle(at 0% 0%)", "circle(closest-side at 0% 0%)"] , 53 ["circle(at top left)", "circle(at 0% 0%)", "circle(closest-side at 0% 0%)"] ,
54 ["circle(at right bottom)", "circle(at 100% 100%)", "circle(closest-side at 100% 100%)"], 54 ["circle(at right bottom)", "circle(at 100% 100%)", "circle(closest-side at 100% 100%)"],
55 ["circle(10px at left top 10px)", "circle(10px at left 0% top 10px)", "circl e(10px at 0% 10px)"], 55 ["circle(10px at left top 10px)", "circle(10px at 0% 10px)"],
56 ["circle(10px at top 10px left 10px)", "circle(10px at left 10px top 10px)", "circle(10px at 10px 10px)"], 56 ["circle(10px at top 10px left 10px)", "circle(10px at 10px 10px)"],
57 ["circle(10px at right 10% bottom 10%)", "circle(10px at 90% 90%)"],
58 ["circle(10px at right 0px bottom 0px)", "circle(10px at 100% 100%)"],
57 ["circle(10px at right 10px bottom 10px)", "circle(10px at right 10px bottom 10px)"], 59 ["circle(10px at right 10px bottom 10px)", "circle(10px at right 10px bottom 10px)"],
58 60
59 "ellipse(10px, 20px, 30px, 40px)", // FIXME: Remove this test once we do not support the deprecated CSS Shapes syntax anymore. 61 "ellipse(10px, 20px, 30px, 40px)", // FIXME: Remove this test once we do not support the deprecated CSS Shapes syntax anymore.
60 62
61 ["ellipse()", "ellipse()", "ellipse(closest-side closest-side at 50% 50%)"], 63 ["ellipse()", "ellipse(at 50% 50%)", "ellipse(closest-side closest-side at 5 0% 50%)"],
62 ["ellipse(10px)", "ellipse(10px)", "ellipse(10px closest-side at 50% 50%)"], 64 ["ellipse(10px)", "ellipse(10px at 50% 50%)", "ellipse(10px closest-side at 50% 50%)"],
63 ["ellipse(10px 20px)", "ellipse(10px 20px)", "ellipse(10px 20px at 50% 50%)" ], 65 ["ellipse(10px 20px)", "ellipse(10px 20px at 50% 50%)"],
64 ["ellipse(10px at 10px)", "ellipse(10px at 10px 50%)", "ellipse(10px closest -side at 10px 50%)"], 66 ["ellipse(10px at 10px)", "ellipse(10px at 10px 50%)", "ellipse(10px closest -side at 10px 50%)"],
65 ["ellipse(10px 20px at 10px)", "ellipse(10px 20px at 10px 50%)"], 67 ["ellipse(10px 20px at 10px)", "ellipse(10px 20px at 10px 50%)"],
66 ["ellipse(10px at 10px 10px)", "ellipse(10px at 10px 10px)", "ellipse(10px c losest-side at 10px 10px)"], 68 ["ellipse(10px at 10px 10px)", "ellipse(10px at 10px 10px)", "ellipse(10px c losest-side at 10px 10px)"],
67 ["ellipse(at 10px)", "ellipse(at 10px 50%)", "ellipse(closest-side closest-s ide at 10px 50%)"], 69 ["ellipse(at 10px)", "ellipse(at 10px 50%)", "ellipse(closest-side closest-s ide at 10px 50%)"],
68 ["ellipse(at 10px 10px)", "ellipse(at 10px 10px)", "ellipse(closest-side clo sest-side at 10px 10px)"], 70 ["ellipse(at 10px 10px)", "ellipse(at 10px 10px)", "ellipse(closest-side clo sest-side at 10px 10px)"],
69 ["ellipse(at top left)", "ellipse(at 0% 0%)", "ellipse(closest-side closest- side at 0% 0%)"], 71 ["ellipse(at top left)", "ellipse(at 0% 0%)", "ellipse(closest-side closest- side at 0% 0%)"],
70 ["ellipse(at right bottom)", "ellipse(at 100% 100%)", "ellipse(closest-side closest-side at 100% 100%)"], 72 ["ellipse(at right bottom)", "ellipse(at 100% 100%)", "ellipse(closest-side closest-side at 100% 100%)"],
71 ["ellipse(10px at left top 10px)", "ellipse(10px at left 0% top 10px)", "ell ipse(10px closest-side at 0% 10px)"], 73 ["ellipse(10px at left top 10px)", "ellipse(10px at 0% 10px)", "ellipse(10px closest-side at 0% 10px)"],
72 ["ellipse(10px at top 10px left 10px)", "ellipse(10px at left 10px top 10px) ", "ellipse(10px closest-side at 10px 10px)"], 74 ["ellipse(10px at top 10px left 10px)", "ellipse(10px at 10px 10px)", "ellip se(10px closest-side at 10px 10px)"],
73 ["ellipse(10px at right 10px bottom 10px)", "ellipse(10px at right 10px bott om 10px)", "ellipse(10px closest-side at right 10px bottom 10px)"], 75 ["ellipse(10px at right 10px bottom 10px)", "ellipse(10px at right 10px bott om 10px)", "ellipse(10px closest-side at right 10px bottom 10px)"],
74 ["ellipse(10px 20px at left top 10px)", "ellipse(10px 20px at left 0% top 10 px)", "ellipse(10px 20px at 0% 10px)"], 76 ["ellipse(10px 20px at left top 10px)", "ellipse(10px 20px at 0% 10px)"],
75 ["ellipse(10px 20px at top 10px left 10px)", "ellipse(10px 20px at left 10px top 10px)", "ellipse(10px 20px at 10px 10px)"], 77 ["ellipse(10px 20px at top 10px left 10px)", "ellipse(10px 20px at 10px 10px )"],
76 ["ellipse(10px 20px at right 10px bottom 10px)", "ellipse(10px 20px at right 10px bottom 10px)"], 78 ["ellipse(10px 20px at right 10px bottom 10px)", "ellipse(10px 20px at right 10px bottom 10px)"],
77 79
78 ["polygon(10px 20px, 30px 40px, 40px 50px)", "polygon(nonzero, 10px 20px, 30 px 40px, 40px 50px)"], 80 ["polygon(10px 20px, 30px 40px, 40px 50px)", "polygon(nonzero, 10px 20px, 30 px 40px, 40px 50px)"],
79 ["polygon(evenodd, 10px 20px, 30px 40px, 40px 50px)", "polygon(evenodd, 10px 20px, 30px 40px, 40px 50px)"], 81 ["polygon(evenodd, 10px 20px, 30px 40px, 40px 50px)", "polygon(evenodd, 10px 20px, 30px 40px, 40px 50px)"],
80 ["polygon(nonzero, 10px 20px, 30px 40px, 40px 50px)", "polygon(nonzero, 10px 20px, 30px 40px, 40px 50px)"], 82 ["polygon(nonzero, 10px 20px, 30px 40px, 40px 50px)", "polygon(nonzero, 10px 20px, 30px 40px, 40px 50px)"],
81 83
82 "content-box", 84 "content-box",
83 "padding-box", 85 "padding-box",
84 "border-box", 86 "border-box",
85 "margin-box", 87 "margin-box",
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 281
280 function testNotInheritedShapeProperty(property, parentValue, childValue, expect edValue) 282 function testNotInheritedShapeProperty(property, parentValue, childValue, expect edValue)
281 { 283 {
282 shouldBeEqualToString('getParentAndChildComputedStylesString("' + property + '", "' + parentValue + '", "' + childValue + '")', expectedValue); 284 shouldBeEqualToString('getParentAndChildComputedStylesString("' + property + '", "' + parentValue + '", "' + childValue + '")', expectedValue);
283 } 285 }
284 286
285 function applyToEachArglist(testFunction, arglists) 287 function applyToEachArglist(testFunction, arglists)
286 { 288 {
287 arglists.forEach(function(arglist, i, a) {testFunction.apply(null, arglist); }); 289 arglists.forEach(function(arglist, i, a) {testFunction.apply(null, arglist); });
288 } 290 }
OLDNEW
« no previous file with comments | « LayoutTests/fast/shapes/parsing/parsing-shape-outside-expected.txt ('k') | Source/core/css/CSSBasicShapes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698