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

Unified Diff: third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/bottom.html

Issue 2583063002: Add common test configs for properties that take lengths (Closed)
Patch Set: Remove extra whitespace Created 3 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/bottom.html
diff --git a/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/bottom.html b/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/bottom.html
index 830b6493a70eefd7c3fec19b84a38616c94e9ebd..71bfc73bd19cadd240638a3a345847e5fba35558 100644
--- a/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/bottom.html
+++ b/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/bottom.html
@@ -1,65 +1,12 @@
<!DOCTYPE html>
<script src='../../../resources/testharness.js'></script>
<script src='../../../resources/testharnessreport.js'></script>
+<script src='config-templates.js'></script>
<script src='property-suite.js'></script>
-
<script>
-
-runInlineStylePropertyMapTests({
- property: 'bottom',
- validKeywords: [
- 'auto'
- ],
- validObjects: [
- new CSSSimpleLength(1, 'px'),
- new CSSSimpleLength(2, 'percent'),
- new CSSSimpleLength(3, 'em'),
- new CSSSimpleLength(4, 'ex'),
- new CSSSimpleLength(5, 'ch'),
- new CSSSimpleLength(6, 'rem'),
- new CSSSimpleLength(7, 'vw'),
- new CSSSimpleLength(8, 'vh'),
- new CSSSimpleLength(9, 'vmin'),
- new CSSSimpleLength(10, 'vmax'),
- new CSSSimpleLength(11, 'cm'),
- new CSSSimpleLength(12, 'mm'),
- new CSSSimpleLength(13, 'in'),
- new CSSSimpleLength(14, 'pc'),
- new CSSSimpleLength(15, 'pt'),
- // Fully populated calc
- new CSSCalcLength({
- px: 1.2,
- percent: -2.3,
- em: 4.5,
- ex: -6.7,
- ch: 8.9,
- rem: -10,
- vw: 1.1,
- vh: -1.2,
- vmin: 1.3,
- vmax: -1.4,
- cm: 1.56,
- mm: -1.7,
- in: 1.8,
- pc: -1.9,
- pt: 2.1}),
- // Contains only px
- new CSSCalcLength({px: 10}),
- // Contains only percent
- new CSSCalcLength({percent: 10}),
- // Contains px and percent
- new CSSCalcLength({px: 6, percent: 10}),
- // Contains neither pixels or percent
- new CSSCalcLength({vmin: 5, in: 10}),
- ],
- validStringMappings: {
- // Contains multiplication
- 'calc(3 * (5px - 2%))': new CSSCalcLength({px: 15, percent: -6}),
- // Contains division
- 'calc((5vmin + 1mm) / 2)': new CSSCalcLength({vmin: 2.5, mm: 0.5}),
- },
- supportsMultiple: false,
- invalidObjects: [new CSSNumberValue(1)]
-});
+let config = config_templates.lengthPercentConfig();
+config['property'] = 'bottom';
+config['validKeywords'] = ['auto'];
+runInlineStylePropertyMapTests(config);
</script>

Powered by Google App Engine
This is Rietveld 408576698