summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-flexbox/order
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
commit43a97878ce14b72f0981164f87f2e35e14151312 (patch)
tree620249daf56c0258faa40cbdcf9cfba06de2a846 /testing/web-platform/tests/css/css-flexbox/order
parentInitial commit. (diff)
downloadfirefox-upstream.tar.xz
firefox-upstream.zip
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/css-flexbox/order')
-rw-r--r--testing/web-platform/tests/css/css-flexbox/order/order-abs-children-painting-order.html49
-rw-r--r--testing/web-platform/tests/css/css-flexbox/order/order-with-column-reverse-ref.html21
-rw-r--r--testing/web-platform/tests/css/css-flexbox/order/order-with-column-reverse.html40
-rw-r--r--testing/web-platform/tests/css/css-flexbox/order/order-with-row-reverse-ref.html29
-rw-r--r--testing/web-platform/tests/css/css-flexbox/order/order-with-row-reverse.html37
5 files changed, 176 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-flexbox/order/order-abs-children-painting-order.html b/testing/web-platform/tests/css/css-flexbox/order/order-abs-children-painting-order.html
new file mode 100644
index 0000000000..248f380e5a
--- /dev/null
+++ b/testing/web-platform/tests/css/css-flexbox/order/order-abs-children-painting-order.html
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<title>CSS Test: flex order affects painting order of absolutely positioned boxes inside flex</title>
+<link rel="author" title="Dennis Schubert" href="mailto:dschubert@mozilla.com">
+<link rel="author" href="https://mozilla.org" title="Mozilla">
+<link rel="help" href="https://drafts.csswg.org/css-flexbox/#propdef-order">
+<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=606208">
+<link rel="match" href="../../reference/ref-filled-green-100px-square-only.html">
+<meta name="assert" content="This test check that absolutely positioned boxes inside flex items have their painting orders affected by 'order'.">
+<style>
+ #test {
+ display: flex;
+ position: relative;
+ height: 100px;
+ width: 100px;
+ }
+
+ #order-1 {
+ order: 1;
+ }
+
+ #order-2 {
+ order: 2;
+ }
+
+ .inner {
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ top: 0;
+ }
+
+ #order-1 .inner {
+ background-color: red;
+ }
+
+ #order-2 .inner {
+ background-color: green;
+ }
+</style>
+<p>Test passes if there is a filled green square.</p>
+<div id="test">
+ <div id="order-2">
+ <div class="inner"></div>
+ </div>
+ <div id="order-1">
+ <div class="inner"></div>
+ </div>
+</div>
diff --git a/testing/web-platform/tests/css/css-flexbox/order/order-with-column-reverse-ref.html b/testing/web-platform/tests/css/css-flexbox/order/order-with-column-reverse-ref.html
new file mode 100644
index 0000000000..c8b9be7c4e
--- /dev/null
+++ b/testing/web-platform/tests/css/css-flexbox/order/order-with-column-reverse-ref.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS Test Reference: flex container layout lowest order with column-reverse direction</title>
+ <link rel="author" title="tmtysk" href="mailto:tmtysk@gmail.com">
+ <link rel="reviewer" title="Tab Atkins" href="mailto:jackalmage@gmail.com">
+ <style>
+ p {
+ margin: 0;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the paragraph below reads 'First,Second,Third' from top.</p>
+ <div id="test">
+ <p id="first">First,</p>
+ <p id="second">Second,</p>
+ <p id="third">Third</p>
+ </div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/css-flexbox/order/order-with-column-reverse.html b/testing/web-platform/tests/css/css-flexbox/order/order-with-column-reverse.html
new file mode 100644
index 0000000000..5083d68436
--- /dev/null
+++ b/testing/web-platform/tests/css/css-flexbox/order/order-with-column-reverse.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS Test: flex container layout lowest order with column-reverse direction</title>
+ <link rel="author" title="tmtysk" href="mailto:tmtysk@gmail.com">
+ <link rel="reviewer" title="Tab Atkins" href="mailto:jackalmage@gmail.com">
+ <link rel="help" href="http://www.w3.org/TR/css-flexbox-1/#order-property">
+ <link rel="match" href="order-with-column-reverse-ref.html">
+ <meta name="assert" content="This test check that a flex container layouts out its content starting with the lowest numbered ordinal group and going up with column-reverse direction.">
+ <style>
+ #test {
+ display: flex;
+ flex-direction: column-reverse;
+ }
+
+ #first {
+ order: 3;
+ }
+
+ #second {
+ order: 2;
+ }
+
+ #third {
+ order: 1;
+ }
+ p {
+ margin: 0;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the paragraph below reads 'First,Second,Third' from top.</p>
+ <div id="test">
+ <p id="second">Second,</p>
+ <p id="first">First,</p>
+ <p id="third">Third</p>
+ </div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/css-flexbox/order/order-with-row-reverse-ref.html b/testing/web-platform/tests/css/css-flexbox/order/order-with-row-reverse-ref.html
new file mode 100644
index 0000000000..c45b612dfe
--- /dev/null
+++ b/testing/web-platform/tests/css/css-flexbox/order/order-with-row-reverse-ref.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS Test Reference: flex container layout lowest order with row-reverse direction</title>
+ <link rel="author" title="tmtysk" href="mailto:tmtysk@gmail.com">
+ <link rel="reviewer" title="Tab Atkins, Jr." href="mailto:jackalmage@gmail.com">
+ <style>
+ #leftmost {
+ float: right;
+ }
+
+ #middle {
+ float: right;
+ }
+
+ #rightmost {
+ float: right;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the paragraph below reads 'First,Second,Third' from leftmost.</p>
+ <div id="test">
+ <p id="rightmost">Third</p>
+ <p id="middle">Second,</p>
+ <p id="leftmost">First,</p>
+ </div>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/css-flexbox/order/order-with-row-reverse.html b/testing/web-platform/tests/css/css-flexbox/order/order-with-row-reverse.html
new file mode 100644
index 0000000000..c36d4831b9
--- /dev/null
+++ b/testing/web-platform/tests/css/css-flexbox/order/order-with-row-reverse.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS Test: flex container layout lowest order with row-reverse direction</title>
+ <link rel="author" title="tmtysk" href="mailto:tmtysk@gmail.com">
+ <link rel="reviewer" title="Tab Atkins, Jr." href="mailto:jackalmage@gmail.com">
+ <link rel="help" href="http://www.w3.org/TR/css-flexbox-1/#order-property">
+ <link rel="match" href="order-with-row-reverse-ref.html">
+ <meta name="assert" content="This test check that a flex container layouts out its content starting with the lowest numbered ordinal group and going up with row-reverse direction.">
+ <style>
+ #test {
+ display: flex;
+ flex-direction: row-reverse;
+ }
+
+ #leftmost {
+ order: 1;
+ }
+
+ #middle {
+ order: 0;
+ }
+
+ #rightmost {
+ order: -1;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the paragraph below reads 'First,Second,Third' from leftmost.</p>
+ <div id="test">
+ <p id="leftmost">First,</p>
+ <p id="middle">Second,</p>
+ <p id="rightmost">Third</p>
+ </div>
+ </body>
+</html>