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

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

Issue 226373002: [CSS Shapes] shape-margin in percentage units always computes to 0px (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove webkit prefixes Created 6 years, 8 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 9
10 "inset(10px)", 10 "inset(10px)",
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 163
164 // Valid length values for shape-margin and shape-padding. 164 // Valid length values for shape-margin and shape-padding.
165 var validShapeLengths = [ 165 var validShapeLengths = [
166 "1.5ex", 166 "1.5ex",
167 "2em", 167 "2em",
168 "2.5in", 168 "2.5in",
169 "3cm", 169 "3cm",
170 "3.5mm", 170 "3.5mm",
171 "4pt", 171 "4pt",
172 "4.5pc", 172 "4.5pc",
173 "5px" 173 "5px",
174 "120%"
174 ]; 175 ];
175 176
176 // Invalid length values for shape-margin and shape-padding. 177 // Invalid length values for shape-margin and shape-padding.
177 var invalidShapeLengths = [ 178 var invalidShapeLengths = [
178 "-5px", 179 "-5px",
179 "none", 180 "none",
180 "120%",
181 "\'string\'" 181 "\'string\'"
182 ]; 182 ];
183 183
184 function getCSSText(property, value) 184 function getCSSText(property, value)
185 { 185 {
186 var element = document.createElement("div"); 186 var element = document.createElement("div");
187 element.style.cssText = property + ": " + value; 187 element.style.cssText = property + ": " + value;
188 return element.style[property]; 188 return element.style[property];
189 } 189 }
190 190
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 262
263 function testNotInheritedShapeProperty(property, parentValue, childValue, expect edValue) 263 function testNotInheritedShapeProperty(property, parentValue, childValue, expect edValue)
264 { 264 {
265 shouldBeEqualToString('getParentAndChildComputedStylesString("' + property + '", "' + parentValue + '", "' + childValue + '")', expectedValue); 265 shouldBeEqualToString('getParentAndChildComputedStylesString("' + property + '", "' + parentValue + '", "' + childValue + '")', expectedValue);
266 } 266 }
267 267
268 function applyToEachArglist(testFunction, arglists) 268 function applyToEachArglist(testFunction, arglists)
269 { 269 {
270 arglists.forEach(function(arglist, i, a) {testFunction.apply(null, arglist); }); 270 arglists.forEach(function(arglist, i, a) {testFunction.apply(null, arglist); });
271 } 271 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698