summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-flexbox/parsing
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/css/css-flexbox/parsing')
-rw-r--r--testing/web-platform/tests/css/css-flexbox/parsing/flex-basis-computed.html37
-rw-r--r--testing/web-platform/tests/css/css-flexbox/parsing/flex-basis-invalid.html22
-rw-r--r--testing/web-platform/tests/css/css-flexbox/parsing/flex-basis-valid.html25
-rw-r--r--testing/web-platform/tests/css/css-flexbox/parsing/flex-computed.html30
-rw-r--r--testing/web-platform/tests/css/css-flexbox/parsing/flex-direction-computed.html21
-rw-r--r--testing/web-platform/tests/css/css-flexbox/parsing/flex-direction-invalid.html19
-rw-r--r--testing/web-platform/tests/css/css-flexbox/parsing/flex-direction-valid.html21
-rw-r--r--testing/web-platform/tests/css/css-flexbox/parsing/flex-flow-computed.html19
-rw-r--r--testing/web-platform/tests/css/css-flexbox/parsing/flex-flow-invalid.html19
-rw-r--r--testing/web-platform/tests/css/css-flexbox/parsing/flex-flow-shorthand.html25
-rw-r--r--testing/web-platform/tests/css/css-flexbox/parsing/flex-flow-valid.html20
-rw-r--r--testing/web-platform/tests/css/css-flexbox/parsing/flex-grow-computed.html21
-rw-r--r--testing/web-platform/tests/css/css-flexbox/parsing/flex-grow-invalid.html22
-rw-r--r--testing/web-platform/tests/css/css-flexbox/parsing/flex-grow-valid.html21
-rw-r--r--testing/web-platform/tests/css/css-flexbox/parsing/flex-invalid.html21
-rw-r--r--testing/web-platform/tests/css/css-flexbox/parsing/flex-shorthand.html69
-rw-r--r--testing/web-platform/tests/css/css-flexbox/parsing/flex-shrink-computed.html21
-rw-r--r--testing/web-platform/tests/css/css-flexbox/parsing/flex-shrink-invalid.html22
-rw-r--r--testing/web-platform/tests/css/css-flexbox/parsing/flex-shrink-valid.html21
-rw-r--r--testing/web-platform/tests/css/css-flexbox/parsing/flex-valid.html26
-rw-r--r--testing/web-platform/tests/css/css-flexbox/parsing/flex-wrap-computed.html20
-rw-r--r--testing/web-platform/tests/css/css-flexbox/parsing/flex-wrap-invalid.html19
-rw-r--r--testing/web-platform/tests/css/css-flexbox/parsing/flex-wrap-valid.html20
-rw-r--r--testing/web-platform/tests/css/css-flexbox/parsing/order-computed.html20
-rw-r--r--testing/web-platform/tests/css/css-flexbox/parsing/order-invalid.html20
-rw-r--r--testing/web-platform/tests/css/css-flexbox/parsing/order-valid.html20
26 files changed, 621 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-flexbox/parsing/flex-basis-computed.html b/testing/web-platform/tests/css/css-flexbox/parsing/flex-basis-computed.html
new file mode 100644
index 0000000000..a5a9dc82c2
--- /dev/null
+++ b/testing/web-platform/tests/css/css-flexbox/parsing/flex-basis-computed.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Flexible Box Layout: getComputedStyle().flexBasis</title>
+<link rel="help" href="https://drafts.csswg.org/css-flexbox/#propdef-flex-basis">
+<meta name="assert" content="flex-basis computed value is as specified, with length made absolute.">
+<meta name="assert" content="flex-basis computed value is non-negative.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/computed-testcommon.js"></script>
+<style>
+ #target {
+ font-size: 40px;
+ }
+</style>
+</head>
+<body>
+<div id="target"></div>
+<script>
+test_computed_value("flex-basis", "1px");
+test_computed_value("flex-basis", "400%");
+test_computed_value("flex-basis", "auto");
+test_computed_value("flex-basis", "content");
+test_computed_value("flex-basis", "fit-content");
+test_computed_value("flex-basis", "min-content");
+test_computed_value("flex-basis", "max-content");
+
+test_computed_value("flex-basis", "calc(10px + 0.5em)", "30px");
+test_computed_value("flex-basis", "calc(10px - 0.5em)", "0px");
+test_computed_value("flex-basis", "calc(10%)", "10%");
+// https://github.com/w3c/csswg-drafts/issues/3482
+test_computed_value("flex-basis", "calc(0% + 10px)", "calc(0% + 10px)");
+test_computed_value("flex-basis", "calc(10% + 0px)", "10%");
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/css-flexbox/parsing/flex-basis-invalid.html b/testing/web-platform/tests/css/css-flexbox/parsing/flex-basis-invalid.html
new file mode 100644
index 0000000000..502a21c016
--- /dev/null
+++ b/testing/web-platform/tests/css/css-flexbox/parsing/flex-basis-invalid.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Flexible Box Layout Module Level 1: parsing flex-basis with invalid values</title>
+<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
+<link rel="help" href="https://drafts.csswg.org/css-flexbox/#propdef-flex-basis">
+<meta name="assert" content="flex-basis supports only the grammar 'content | <‘width’>'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_invalid_value("flex-basis", "none");
+test_invalid_value("flex-basis", "auto content");
+test_invalid_value("flex-basis", "-1px");
+test_invalid_value("flex-basis", "-2%");
+test_invalid_value("flex-basis", "3px 4%");
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/css-flexbox/parsing/flex-basis-valid.html b/testing/web-platform/tests/css/css-flexbox/parsing/flex-basis-valid.html
new file mode 100644
index 0000000000..b49351915c
--- /dev/null
+++ b/testing/web-platform/tests/css/css-flexbox/parsing/flex-basis-valid.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Flexible Box Layout Module Level 1: parsing flex-basis with valid values</title>
+<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
+<link rel="help" href="https://drafts.csswg.org/css-flexbox/#propdef-flex-basis">
+<meta name="assert" content="flex-basis supports the full grammar 'content | <‘width’>'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_valid_value("flex-basis", "1px");
+test_valid_value("flex-basis", "calc(2em + 3ex)");
+test_valid_value("flex-basis", "400%");
+test_valid_value("flex-basis", "auto");
+test_valid_value("flex-basis", "fit-content");
+test_valid_value("flex-basis", "min-content");
+test_valid_value("flex-basis", "max-content");
+test_valid_value("flex-basis", "content");
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/css-flexbox/parsing/flex-computed.html b/testing/web-platform/tests/css/css-flexbox/parsing/flex-computed.html
new file mode 100644
index 0000000000..ea1f4f6fa4
--- /dev/null
+++ b/testing/web-platform/tests/css/css-flexbox/parsing/flex-computed.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Flexible Box Layout: getComputedStyle().flex</title>
+<link rel="help" href="https://drafts.csswg.org/css-flexbox/#propdef-flex">
+<meta name="assert" content="flex computed value is specified keywords and/or computed <length-percentage>.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/computed-testcommon.js"></script>
+<style>
+ #target {
+ font-size: 40px;
+ }
+</style>
+</head>
+<body>
+<div id="target"></div>
+<script>
+test_computed_value("flex", "none", "0 0 auto");
+test_computed_value("flex", "1", "1 1 0%");
+test_computed_value("flex", "2 3", "2 3 0%");
+test_computed_value("flex", "4 5 6px");
+test_computed_value("flex", "7% 8", "8 1 7%");
+test_computed_value("flex", "8 auto", "8 1 auto");
+test_computed_value("flex", "calc(10px + 0.5em)", "1 1 30px");
+test_computed_value("flex", "calc(10px - 0.5em)", "1 1 0px");
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/css-flexbox/parsing/flex-direction-computed.html b/testing/web-platform/tests/css/css-flexbox/parsing/flex-direction-computed.html
new file mode 100644
index 0000000000..0d6b0bb6f2
--- /dev/null
+++ b/testing/web-platform/tests/css/css-flexbox/parsing/flex-direction-computed.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Flexible Box Layout: getComputedStyle().flexDirection</title>
+<link rel="help" href="https://drafts.csswg.org/css-flexbox/#propdef-flex-direction">
+<meta name="assert" content="flex-direction computed value is as specified.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/computed-testcommon.js"></script>
+</head>
+<body>
+<div id="target"></div>
+<script>
+test_computed_value("flex-direction", "row");
+test_computed_value("flex-direction", "row-reverse");
+test_computed_value("flex-direction", "column");
+test_computed_value("flex-direction", "column-reverse");
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/css-flexbox/parsing/flex-direction-invalid.html b/testing/web-platform/tests/css/css-flexbox/parsing/flex-direction-invalid.html
new file mode 100644
index 0000000000..81fa8beb7e
--- /dev/null
+++ b/testing/web-platform/tests/css/css-flexbox/parsing/flex-direction-invalid.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Flexible Box Layout Module Level 1: parsing flex-direction with invalid values</title>
+<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
+<link rel="help" href="https://drafts.csswg.org/css-flexbox/#propdef-flex-direction">
+<meta name="assert" content="flex-direction supports only the grammar 'row | row-reverse | column | column-reverse'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_invalid_value("flex-direction", "auto");
+test_invalid_value("flex-direction", "column row-reverse");
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/css-flexbox/parsing/flex-direction-valid.html b/testing/web-platform/tests/css/css-flexbox/parsing/flex-direction-valid.html
new file mode 100644
index 0000000000..75e108478c
--- /dev/null
+++ b/testing/web-platform/tests/css/css-flexbox/parsing/flex-direction-valid.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Flexible Box Layout Module Level 1: parsing flex-direction with valid values</title>
+<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
+<link rel="help" href="https://drafts.csswg.org/css-flexbox/#propdef-flex-direction">
+<meta name="assert" content="flex-direction supports the full grammar 'row | row-reverse | column | column-reverse'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_valid_value("flex-direction", "row");
+test_valid_value("flex-direction", "row-reverse");
+test_valid_value("flex-direction", "column");
+test_valid_value("flex-direction", "column-reverse");
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/css-flexbox/parsing/flex-flow-computed.html b/testing/web-platform/tests/css/css-flexbox/parsing/flex-flow-computed.html
new file mode 100644
index 0000000000..2dda28ab44
--- /dev/null
+++ b/testing/web-platform/tests/css/css-flexbox/parsing/flex-flow-computed.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Animations: getComputedStyle().flexFlow</title>
+<link rel="help" href="https://drafts.csswg.org/css-flexbox/#propdef-flex-flow">
+<meta name="assert" content="flex-flow computed value is as specified.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/computed-testcommon.js"></script>
+</head>
+<body>
+<div id="target"></div>
+<script>
+test_computed_value("flex-flow", "column wrap-reverse");
+test_computed_value("flex-flow", "row-reverse wrap");
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/css-flexbox/parsing/flex-flow-invalid.html b/testing/web-platform/tests/css/css-flexbox/parsing/flex-flow-invalid.html
new file mode 100644
index 0000000000..e82c284632
--- /dev/null
+++ b/testing/web-platform/tests/css/css-flexbox/parsing/flex-flow-invalid.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Flexible Box Layout Module Level 1: parsing flex-flow with invalid values</title>
+<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
+<link rel="help" href="https://drafts.csswg.org/css-flexbox/#propdef-flex-flow">
+<meta name="assert" content="flex-flow supports only the grammar '<flex-direction> || <flex-wrap>'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_invalid_value("flex-flow", "nowrap row nowrap");
+test_invalid_value("flex-flow", "column wrap column");
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/css-flexbox/parsing/flex-flow-shorthand.html b/testing/web-platform/tests/css/css-flexbox/parsing/flex-flow-shorthand.html
new file mode 100644
index 0000000000..6ae19bdc04
--- /dev/null
+++ b/testing/web-platform/tests/css/css-flexbox/parsing/flex-flow-shorthand.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Flexible Box Layout Module Level 1: flex-flow sets longhands</title>
+<link rel="help" href="https://drafts.csswg.org/css-flexbox/#propdef-flex-flow">
+<meta name="assert" content="flex-flow supports the full grammar '<flex-direction> || <flex-wrap>'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/shorthand-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_shorthand_value('flex-flow', 'nowrap column', {
+ 'flex-direction': 'column',
+ 'flex-wrap': 'nowrap'
+});
+
+test_shorthand_value('flex-flow', 'wrap row-reverse', {
+ 'flex-direction': 'row-reverse',
+ 'flex-wrap': 'wrap'
+});
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/css-flexbox/parsing/flex-flow-valid.html b/testing/web-platform/tests/css/css-flexbox/parsing/flex-flow-valid.html
new file mode 100644
index 0000000000..01acd43509
--- /dev/null
+++ b/testing/web-platform/tests/css/css-flexbox/parsing/flex-flow-valid.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Flexible Box Layout Module Level 1: parsing flex-flow with valid values</title>
+<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
+<link rel="help" href="https://drafts.csswg.org/css-flexbox/#propdef-flex-flow">
+<meta name="assert" content="flex-flow supports the full grammar '<flex-direction> || <flex-wrap>'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_valid_value("flex-flow", "column nowrap");
+test_valid_value("flex-flow", "nowrap column", "column nowrap");
+test_valid_value("flex-flow", "wrap row-reverse", "row-reverse wrap");
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/css-flexbox/parsing/flex-grow-computed.html b/testing/web-platform/tests/css/css-flexbox/parsing/flex-grow-computed.html
new file mode 100644
index 0000000000..7e8c4c429e
--- /dev/null
+++ b/testing/web-platform/tests/css/css-flexbox/parsing/flex-grow-computed.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Flexible Box Layout: getComputedStyle().flexGrow</title>
+<link rel="help" href="https://drafts.csswg.org/css-flexbox/#propdef-flex-grow">
+<meta name="assert" content="flex-grow computed value is as specified.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/computed-testcommon.js"></script>
+</head>
+<body>
+<div id="target"></div>
+<script>
+test_computed_value("flex-grow", "1");
+test_computed_value("flex-grow", "2.34e+06", ["2.34e+06", "2340000"]);
+test_computed_value("flex-grow", "6.78e+08", ["6.78e+08", "678000000"]);
+test_computed_value("flex-grow", "0");
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/css-flexbox/parsing/flex-grow-invalid.html b/testing/web-platform/tests/css/css-flexbox/parsing/flex-grow-invalid.html
new file mode 100644
index 0000000000..7af51e77a8
--- /dev/null
+++ b/testing/web-platform/tests/css/css-flexbox/parsing/flex-grow-invalid.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Flexible Box Layout Module Level 1: parsing flex-grow with invalid values</title>
+<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
+<link rel="help" href="https://drafts.csswg.org/css-flexbox/#propdef-flex-grow">
+<meta name="assert" content="flex-grow supports only the grammar '<number>'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_invalid_value("flex-grow", "2e3.4");
+test_invalid_value("flex-grow", "-+5");
+test_invalid_value("flex-grow", "6 7");
+
+test_invalid_value("flex-grow", "1."); // Accepted by Edge.
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/css-flexbox/parsing/flex-grow-valid.html b/testing/web-platform/tests/css/css-flexbox/parsing/flex-grow-valid.html
new file mode 100644
index 0000000000..9abc79cb79
--- /dev/null
+++ b/testing/web-platform/tests/css/css-flexbox/parsing/flex-grow-valid.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Flexible Box Layout Module Level 1: parsing flex-grow with valid values</title>
+<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
+<link rel="help" href="https://drafts.csswg.org/css-flexbox/#propdef-flex-grow">
+<meta name="assert" content="flex-grow supports the full grammar '<number>'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_valid_value("flex-grow", "1");
+test_valid_value("flex-grow", "23.4e5", ["2.34e+06", "2.34e+006", "2340000"]);
+test_valid_value("flex-grow", "+.678E9", ["6.78e+08", "6.78e+008", "678000000"]);
+test_valid_value("flex-grow", ".0", "0");
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/css-flexbox/parsing/flex-invalid.html b/testing/web-platform/tests/css/css-flexbox/parsing/flex-invalid.html
new file mode 100644
index 0000000000..ae010d7b4b
--- /dev/null
+++ b/testing/web-platform/tests/css/css-flexbox/parsing/flex-invalid.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Flexible Box Layout Module Level 1: parsing flex with invalid values</title>
+<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
+<link rel="help" href="https://drafts.csswg.org/css-flexbox/#propdef-flex">
+<meta name="assert" content="flex supports only the grammar 'none | [ <‘flex-grow’> <‘flex-shrink’>? || <‘flex-basis’> ]'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_invalid_value("flex", "none 1");
+test_invalid_value("flex", "2 3 4");
+test_invalid_value("flex", "5px 7%");
+test_invalid_value("flex", "9 none");
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/css-flexbox/parsing/flex-shorthand.html b/testing/web-platform/tests/css/css-flexbox/parsing/flex-shorthand.html
new file mode 100644
index 0000000000..1d74df8083
--- /dev/null
+++ b/testing/web-platform/tests/css/css-flexbox/parsing/flex-shorthand.html
@@ -0,0 +1,69 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Flexible Box Layout Module Level 1: flex sets longhands</title>
+<link rel="help" href="https://drafts.csswg.org/css-flexbox/#propdef-flex">
+<meta name="assert" content="flex supports the full grammar 'none | [ <‘flex-grow’> <‘flex-shrink’>? || <‘flex-basis’> ]'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/shorthand-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_shorthand_value('flex', 'none', {
+ 'flex-grow': '0',
+ 'flex-shrink': '0',
+ 'flex-basis': 'auto'
+});
+
+test_shorthand_value('flex', '1', {
+ 'flex-grow': '1',
+ 'flex-shrink': '1',
+ 'flex-basis': '0%'
+});
+
+test_shorthand_value('flex', '2 3', {
+ 'flex-grow': '2',
+ 'flex-shrink': '3',
+ 'flex-basis': '0%'
+});
+
+test_shorthand_value('flex', '4 5 6px', {
+ 'flex-grow': '4',
+ 'flex-shrink': '5',
+ 'flex-basis': '6px'
+});
+
+test_shorthand_value('flex', '7% 8', {
+ 'flex-grow': '8',
+ 'flex-shrink': '1',
+ 'flex-basis': '7%'
+});
+
+test_shorthand_value('flex', '8 auto', {
+ 'flex-grow': '8',
+ 'flex-shrink': '1',
+ 'flex-basis': 'auto'
+});
+
+test_shorthand_value('flex', 'content', {
+ 'flex-grow': '1',
+ 'flex-shrink': '1',
+ 'flex-basis': 'content'
+});
+
+test_shorthand_value('flex', '0 fit-content', {
+ 'flex-grow': '0',
+ 'flex-shrink': '1',
+ 'flex-basis': 'fit-content'
+});
+
+test_shorthand_value('flex', '1 0 max-content', {
+ 'flex-grow': '1',
+ 'flex-shrink': '0',
+ 'flex-basis': 'max-content'
+});
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/css-flexbox/parsing/flex-shrink-computed.html b/testing/web-platform/tests/css/css-flexbox/parsing/flex-shrink-computed.html
new file mode 100644
index 0000000000..b2f21c07e5
--- /dev/null
+++ b/testing/web-platform/tests/css/css-flexbox/parsing/flex-shrink-computed.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Flexible Box Layout: getComputedStyle().flexShrink</title>
+<link rel="help" href="https://drafts.csswg.org/css-flexbox/#propdef-flex-shrink">
+<meta name="assert" content="flex-shrink computed value is as specified.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/computed-testcommon.js"></script>
+</head>
+<body>
+<div id="target"></div>
+<script>
+test_computed_value("flex-shrink", "1");
+test_computed_value("flex-shrink", "2.34e+06", ["2.34e+06", "2340000"]);
+test_computed_value("flex-shrink", "6.78e+08", ["6.78e+08", "678000000"]);
+test_computed_value("flex-shrink", "0");
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/css-flexbox/parsing/flex-shrink-invalid.html b/testing/web-platform/tests/css/css-flexbox/parsing/flex-shrink-invalid.html
new file mode 100644
index 0000000000..9fa53de051
--- /dev/null
+++ b/testing/web-platform/tests/css/css-flexbox/parsing/flex-shrink-invalid.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Flexible Box Layout Module Level 1: parsing flex-shrink with invalid values</title>
+<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
+<link rel="help" href="https://drafts.csswg.org/css-flexbox/#propdef-flex-shrink">
+<meta name="assert" content="flex-shrink supports only the grammar '<number>'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_invalid_value("flex-shrink", "2e3.4");
+test_invalid_value("flex-shrink", "-+5");
+test_invalid_value("flex-shrink", "6 7");
+
+test_invalid_value("flex-shrink", "1."); // Accepted by Edge.
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/css-flexbox/parsing/flex-shrink-valid.html b/testing/web-platform/tests/css/css-flexbox/parsing/flex-shrink-valid.html
new file mode 100644
index 0000000000..1376e8a43c
--- /dev/null
+++ b/testing/web-platform/tests/css/css-flexbox/parsing/flex-shrink-valid.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Flexible Box Layout Module Level 1: parsing flex-shrink with valid values</title>
+<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
+<link rel="help" href="https://drafts.csswg.org/css-flexbox/#propdef-flex-shrink">
+<meta name="assert" content="flex-shrink supports the full grammar '<number>'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_valid_value("flex-shrink", "1");
+test_valid_value("flex-shrink", "23.4e5", ["2.34e+06", "2.34e+006", "2340000"]);
+test_valid_value("flex-shrink", "+.678E9", ["6.78e+08", "6.78e+008", "678000000"]);
+test_valid_value("flex-shrink", ".0", "0");
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/css-flexbox/parsing/flex-valid.html b/testing/web-platform/tests/css/css-flexbox/parsing/flex-valid.html
new file mode 100644
index 0000000000..f3eaf118da
--- /dev/null
+++ b/testing/web-platform/tests/css/css-flexbox/parsing/flex-valid.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Flexible Box Layout Module Level 1: parsing flex with valid values</title>
+<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
+<link rel="help" href="https://drafts.csswg.org/css-flexbox/#propdef-flex">
+<meta name="assert" content="flex supports the full grammar 'none | [ <‘flex-grow’> <‘flex-shrink’>? || <‘flex-basis’> ]'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_valid_value("flex", "none", "0 0 auto");
+test_valid_value("flex", "1", "1 1 0%");
+test_valid_value("flex", "2 3", "2 3 0%");
+test_valid_value("flex", "4 5 6px");
+test_valid_value("flex", "7% 8", "8 1 7%");
+test_valid_value("flex", "8 auto", "8 1 auto");
+
+// The following is not yet supported by browsers:
+// test_valid_value("flex", "content");
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/css-flexbox/parsing/flex-wrap-computed.html b/testing/web-platform/tests/css/css-flexbox/parsing/flex-wrap-computed.html
new file mode 100644
index 0000000000..e471bdd787
--- /dev/null
+++ b/testing/web-platform/tests/css/css-flexbox/parsing/flex-wrap-computed.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Flexible Box Layout: getComputedStyle().flexWrap</title>
+<link rel="help" href="https://drafts.csswg.org/css-flexbox/#propdef-flex-wrap">
+<meta name="assert" content="flex-wrap computed value is as specified.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/computed-testcommon.js"></script>
+</head>
+<body>
+<div id="target"></div>
+<script>
+test_computed_value("flex-wrap", "nowrap");
+test_computed_value("flex-wrap", "wrap");
+test_computed_value("flex-wrap", "wrap-reverse");
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/css-flexbox/parsing/flex-wrap-invalid.html b/testing/web-platform/tests/css/css-flexbox/parsing/flex-wrap-invalid.html
new file mode 100644
index 0000000000..45b0029402
--- /dev/null
+++ b/testing/web-platform/tests/css/css-flexbox/parsing/flex-wrap-invalid.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Flexible Box Layout Module Level 1: parsing flex-wrap with invalid values</title>
+<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
+<link rel="help" href="https://drafts.csswg.org/css-flexbox/#propdef-flex-wrap">
+<meta name="assert" content="flex-wrap supports only the grammar 'nowrap | wrap | wrap-reverse'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_invalid_value("flex-wrap", "auto");
+test_invalid_value("flex-wrap", "nowrap wrap");
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/css-flexbox/parsing/flex-wrap-valid.html b/testing/web-platform/tests/css/css-flexbox/parsing/flex-wrap-valid.html
new file mode 100644
index 0000000000..a3a56cc2da
--- /dev/null
+++ b/testing/web-platform/tests/css/css-flexbox/parsing/flex-wrap-valid.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Flexible Box Layout Module Level 1: parsing flex-wrap with valid values</title>
+<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
+<link rel="help" href="https://drafts.csswg.org/css-flexbox/#propdef-flex-wrap">
+<meta name="assert" content="flex-wrap supports the full grammar 'nowrap | wrap | wrap-reverse'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_valid_value("flex-wrap", "nowrap");
+test_valid_value("flex-wrap", "wrap");
+test_valid_value("flex-wrap", "wrap-reverse");
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/css-flexbox/parsing/order-computed.html b/testing/web-platform/tests/css/css-flexbox/parsing/order-computed.html
new file mode 100644
index 0000000000..9571996199
--- /dev/null
+++ b/testing/web-platform/tests/css/css-flexbox/parsing/order-computed.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Flexible Box Layout Module Level 1: getComputedStyle().order</title>
+<link rel="help" href="https://drafts.csswg.org/css-flexbox/#propdef-order">
+<meta name="assert" content="order computed value is the specified integer.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/computed-testcommon.js"></script>
+</head>
+<body>
+<div id="target"></div>
+<script>
+test_computed_value("order", "0");
+test_computed_value("order", "123");
+test_computed_value("order", "-45");
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/css-flexbox/parsing/order-invalid.html b/testing/web-platform/tests/css/css-flexbox/parsing/order-invalid.html
new file mode 100644
index 0000000000..7a60396b68
--- /dev/null
+++ b/testing/web-platform/tests/css/css-flexbox/parsing/order-invalid.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Flexible Box Layout Module Level 1: parsing order with invalid values</title>
+<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
+<link rel="help" href="https://drafts.csswg.org/css-flexbox/#propdef-order">
+<meta name="assert" content="order supports only the grammar '<integer>'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_invalid_value("order", "auto");
+test_invalid_value("order", "123.45");
+test_invalid_value("order", "123 45");
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/css-flexbox/parsing/order-valid.html b/testing/web-platform/tests/css/css-flexbox/parsing/order-valid.html
new file mode 100644
index 0000000000..fa101d7ee8
--- /dev/null
+++ b/testing/web-platform/tests/css/css-flexbox/parsing/order-valid.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Flexible Box Layout Module Level 1: parsing order with valid values</title>
+<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
+<link rel="help" href="https://drafts.csswg.org/css-flexbox/#propdef-order">
+<meta name="assert" content="order supports the full grammar '<integer>'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_valid_value("order", "0");
+test_valid_value("order", "123");
+test_valid_value("order", "-45");
+</script>
+</body>
+</html>