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

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

Issue 144373002: [CSS Shapes] Basic shapes' computed position should be a horizontal and vertical offset (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Try to fix tests Created 6 years, 11 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)"],
11 "rectangle(10px, 20px, 30px, 40px, 5px, 10px)", 11 "rectangle(10px, 20px, 30px, 40px, 5px, 10px)",
12 12
13 ["inset-rectangle(10px, 20px, 30px, 40px)", "inset-rectangle(10px, 20px, 30p x, 40px)", "inset-rectangle(10px, 20px, 30px, 40px, 0px, 0px)"], 13 ["inset-rectangle(10px, 20px, 30px, 40px)", "inset-rectangle(10px, 20px, 30p x, 40px)", "inset-rectangle(10px, 20px, 30px, 40px, 0px, 0px)"],
14 ["inset-rectangle(10px, 20px, 30px, 40px, 5px)", "inset-rectangle(10px, 20px , 30px, 40px, 5px)", "inset-rectangle(10px, 20px, 30px, 40px, 5px, 5px)"], 14 ["inset-rectangle(10px, 20px, 30px, 40px, 5px)", "inset-rectangle(10px, 20px , 30px, 40px, 5px)", "inset-rectangle(10px, 20px, 30px, 40px, 5px, 5px)"],
15 "inset-rectangle(10px, 20px, 30px, 40px, 5px, 10px)", 15 "inset-rectangle(10px, 20px, 30px, 40px, 5px, 10px)",
16 16
17 "circle(10px, 20px, 30px)", // FIXME: Remove this test once we do not suppor t the deprecated CSS Shapes syntax anymore. 17 "circle(10px, 20px, 30px)", // FIXME: Remove this test once we do not suppor t the deprecated CSS Shapes syntax anymore.
18 18
19 ["circle()", "circle()", "circle(closest-side at 50% 50%)"], 19 ["circle()", "circle()", "circle(closest-side at 50% 50%)"],
20 ["circle(farthest-side)", "circle(farthest-side)", "circle(farthest-side at 50% 50%)"], 20 ["circle(farthest-side)", "circle(farthest-side)", "circle(farthest-side at 50% 50%)"],
21 ["circle(closest-side)", "circle(closest-side)", "circle(closest-side at 50% 50%)"], 21 ["circle(closest-side)", "circle(closest-side)", "circle(closest-side at 50% 50%)"],
22 ["circle(10px)", "circle(10px)", "circle(10px at 50% 50%)"], 22 ["circle(10px)", "circle(10px)", "circle(10px at 50% 50%)"],
23 ["circle(10px at 10px)", "circle(10px at 10px 50%)"], 23 ["circle(10px at 10px)", "circle(10px at 10px 50%)"],
24 "circle(10px at 10px 10px)", 24 "circle(10px at 10px 10px)",
25 ["circle(at 10px)", "circle(at 10px 50%)", "circle(closest-side at 10px 50%) "], 25 ["circle(at 10px)", "circle(at 10px 50%)", "circle(closest-side at 10px 50%) "],
26 ["circle(at 10px 10px)", "circle(at 10px 10px)", "circle(closest-side at 10p x 10px)"], 26 ["circle(at 10px 10px)", "circle(at 10px 10px)", "circle(closest-side at 10p x 10px)"],
27 ["circle(at top left)", "circle(at 0% 0%)", "circle(closest-side at 0% 0%)"] , 27 ["circle(at top left)", "circle(at 0% 0%)", "circle(closest-side at 0% 0%)"] ,
28 ["circle(at right bottom)", "circle(at 100% 100%)", "circle(closest-side at 100% 100%)"], 28 ["circle(at right bottom)", "circle(at 100% 100%)", "circle(closest-side at 100% 100%)"],
29 ["circle(10px at left top 10px)", "circle(10px at left 0% top 10px)"], 29 ["circle(10px at left top 10px)", "circle(10px at left 0% top 10px)", "circl e(10px at 0% 10px)"],
30 ["circle(10px at top 10px left 10px)", "circle(10px at left 10px top 10px)"] , 30 ["circle(10px at top 10px left 10px)", "circle(10px at left 10px top 10px)", "circle(10px at 10px 10px)"],
31 ["circle(10px at right 10px bottom 10px)", "circle(10px at right 10px bottom 10px)"], 31 ["circle(10px at right 10px bottom 10px)", "circle(10px at right 10px bottom 10px)"],
32 32
33 "ellipse(10px, 20px, 30px, 40px)", // FIXME: Remove this test once we do not support the deprecated CSS Shapes syntax anymore. 33 "ellipse(10px, 20px, 30px, 40px)", // FIXME: Remove this test once we do not support the deprecated CSS Shapes syntax anymore.
34 34
35 ["ellipse()", "ellipse()", "ellipse(closest-side closest-side at 50% 50%)"], 35 ["ellipse()", "ellipse()", "ellipse(closest-side closest-side at 50% 50%)"],
36 ["ellipse(10px)", "ellipse(10px)", "ellipse(10px closest-side at 50% 50%)"], 36 ["ellipse(10px)", "ellipse(10px)", "ellipse(10px closest-side at 50% 50%)"],
37 ["ellipse(10px 20px)", "ellipse(10px 20px)", "ellipse(10px 20px at 50% 50%)" ], 37 ["ellipse(10px 20px)", "ellipse(10px 20px)", "ellipse(10px 20px at 50% 50%)" ],
38 ["ellipse(10px at 10px)", "ellipse(10px at 10px 50%)", "ellipse(10px closest -side at 10px 50%)"], 38 ["ellipse(10px at 10px)", "ellipse(10px at 10px 50%)", "ellipse(10px closest -side at 10px 50%)"],
39 ["ellipse(10px 20px at 10px)", "ellipse(10px 20px at 10px 50%)"], 39 ["ellipse(10px 20px at 10px)", "ellipse(10px 20px at 10px 50%)"],
40 ["ellipse(10px at 10px 10px)", "ellipse(10px at 10px 10px)", "ellipse(10px c losest-side at 10px 10px)"], 40 ["ellipse(10px at 10px 10px)", "ellipse(10px at 10px 10px)", "ellipse(10px c losest-side at 10px 10px)"],
41 ["ellipse(at 10px)", "ellipse(at 10px 50%)", "ellipse(closest-side closest-s ide at 10px 50%)"], 41 ["ellipse(at 10px)", "ellipse(at 10px 50%)", "ellipse(closest-side closest-s ide at 10px 50%)"],
42 ["ellipse(at 10px 10px)", "ellipse(at 10px 10px)", "ellipse(closest-side clo sest-side at 10px 10px)"], 42 ["ellipse(at 10px 10px)", "ellipse(at 10px 10px)", "ellipse(closest-side clo sest-side at 10px 10px)"],
43 ["ellipse(at top left)", "ellipse(at 0% 0%)", "ellipse(closest-side closest- side at 0% 0%)"], 43 ["ellipse(at top left)", "ellipse(at 0% 0%)", "ellipse(closest-side closest- side at 0% 0%)"],
44 ["ellipse(at right bottom)", "ellipse(at 100% 100%)", "ellipse(closest-side closest-side at 100% 100%)"], 44 ["ellipse(at right bottom)", "ellipse(at 100% 100%)", "ellipse(closest-side closest-side at 100% 100%)"],
45 ["ellipse(10px at left top 10px)", "ellipse(10px at left 0% top 10px)", "ell ipse(10px closest-side at left 0% top 10px)"], 45 ["ellipse(10px at left top 10px)", "ellipse(10px at left 0% top 10px)", "ell ipse(10px closest-side at 0% 10px)"],
46 ["ellipse(10px at top 10px left 10px)", "ellipse(10px at left 10px top 10px) ", "ellipse(10px closest-side at left 10px top 10px)"], 46 ["ellipse(10px at top 10px left 10px)", "ellipse(10px at left 10px top 10px) ", "ellipse(10px closest-side at 10px 10px)"],
47 ["ellipse(10px at right 10px bottom 10px)", "ellipse(10px at right 10px bott om 10px)", "ellipse(10px closest-side at right 10px bottom 10px)"], 47 ["ellipse(10px at right 10px bottom 10px)", "ellipse(10px at right 10px bott om 10px)", "ellipse(10px closest-side at right 10px bottom 10px)"],
48 ["ellipse(10px 20px at left top 10px)", "ellipse(10px 20px at left 0% top 10 px)"], 48 ["ellipse(10px 20px at left top 10px)", "ellipse(10px 20px at left 0% top 10 px)", "ellipse(10px 20px at 0% 10px)"],
49 ["ellipse(10px 20px at top 10px left 10px)", "ellipse(10px 20px at left 10px top 10px)"], 49 ["ellipse(10px 20px at top 10px left 10px)", "ellipse(10px 20px at left 10px top 10px)", "ellipse(10px 20px at 10px 10px)"],
50 ["ellipse(10px 20px at right 10px bottom 10px)", "ellipse(10px 20px at right 10px bottom 10px)"], 50 ["ellipse(10px 20px at right 10px bottom 10px)", "ellipse(10px 20px at right 10px bottom 10px)"],
51 51
52 ["polygon(10px 20px, 30px 40px, 40px 50px)", "polygon(nonzero, 10px 20px, 30 px 40px, 40px 50px)"], 52 ["polygon(10px 20px, 30px 40px, 40px 50px)", "polygon(nonzero, 10px 20px, 30 px 40px, 40px 50px)"],
53 ["polygon(evenodd, 10px 20px, 30px 40px, 40px 50px)", "polygon(evenodd, 10px 20px, 30px 40px, 40px 50px)"], 53 ["polygon(evenodd, 10px 20px, 30px 40px, 40px 50px)", "polygon(evenodd, 10px 20px, 30px 40px, 40px 50px)"],
54 ["polygon(nonzero, 10px 20px, 30px 40px, 40px 50px)", "polygon(nonzero, 10px 20px, 30px 40px, 40px 50px)"], 54 ["polygon(nonzero, 10px 20px, 30px 40px, 40px 50px)", "polygon(nonzero, 10px 20px, 30px 40px, 40px 50px)"],
55 55
56 "content-box", 56 "content-box",
57 "padding-box", 57 "padding-box",
58 "border-box", 58 "border-box",
59 "margin-box", 59 "margin-box",
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 237
238 function testNotInheritedShapeProperty(property, parentValue, childValue, expect edValue) 238 function testNotInheritedShapeProperty(property, parentValue, childValue, expect edValue)
239 { 239 {
240 shouldBeEqualToString('getParentAndChildComputedStylesString("' + property + '", "' + parentValue + '", "' + childValue + '")', expectedValue); 240 shouldBeEqualToString('getParentAndChildComputedStylesString("' + property + '", "' + parentValue + '", "' + childValue + '")', expectedValue);
241 } 241 }
242 242
243 function applyToEachArglist(testFunction, arglists) 243 function applyToEachArglist(testFunction, arglists)
244 { 244 {
245 arglists.forEach(function(arglist, i, a) {testFunction.apply(null, arglist); }); 245 arglists.forEach(function(arglist, i, a) {testFunction.apply(null, arglist); });
246 } 246 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698