summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/mathml/presentation-markup/direction
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:47:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:47:29 +0000
commit0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d (patch)
treea31f07c9bcca9d56ce61e9a1ffd30ef350d513aa /testing/web-platform/tests/mathml/presentation-markup/direction
parentInitial commit. (diff)
downloadfirefox-esr-0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d.tar.xz
firefox-esr-0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d.zip
Adding upstream version 115.8.0esr.upstream/115.8.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/mathml/presentation-markup/direction')
-rw-r--r--testing/web-platform/tests/mathml/presentation-markup/direction/direction-006-ref.html74
-rw-r--r--testing/web-platform/tests/mathml/presentation-markup/direction/direction-006.html82
-rw-r--r--testing/web-platform/tests/mathml/presentation-markup/direction/direction-007-ref.html42
-rw-r--r--testing/web-platform/tests/mathml/presentation-markup/direction/direction-007.html53
-rw-r--r--testing/web-platform/tests/mathml/presentation-markup/direction/direction-008-ref.html27
-rw-r--r--testing/web-platform/tests/mathml/presentation-markup/direction/direction-008.html36
-rw-r--r--testing/web-platform/tests/mathml/presentation-markup/direction/direction-010-ref.html44
-rw-r--r--testing/web-platform/tests/mathml/presentation-markup/direction/direction-010.html54
-rw-r--r--testing/web-platform/tests/mathml/presentation-markup/direction/direction-overall-ref.html40
-rw-r--r--testing/web-platform/tests/mathml/presentation-markup/direction/direction-overall.html53
-rw-r--r--testing/web-platform/tests/mathml/presentation-markup/direction/direction-token-ref.html16
-rw-r--r--testing/web-platform/tests/mathml/presentation-markup/direction/direction-token.html28
-rw-r--r--testing/web-platform/tests/mathml/presentation-markup/direction/direction.html39
13 files changed, 588 insertions, 0 deletions
diff --git a/testing/web-platform/tests/mathml/presentation-markup/direction/direction-006-ref.html b/testing/web-platform/tests/mathml/presentation-markup/direction/direction-006-ref.html
new file mode 100644
index 0000000000..39e6dabdfb
--- /dev/null
+++ b/testing/web-platform/tests/mathml/presentation-markup/direction/direction-006-ref.html
@@ -0,0 +1,74 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8"/>
+ <title>RTL mtable and mtable with frame</title>
+ <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
+ <style>
+ math, math * {
+ font: 25px Ahem;
+ }
+ </style>
+ </head>
+ <body>
+
+ <p>
+ <math>
+ <mtable>
+ <mtr>
+ <mtd>
+ <mtext>É</mtext>
+ </mtd>
+ <mtd>
+ <mtext>p</mtext>
+ </mtd>
+ <mtd>
+ <mtext>X</mtext>
+ </mtd>
+ </mtr>
+ <mtr>
+ <mtd>
+ <mtext>pÉ</mtext>
+ </mtd>
+ <mtd>
+ <mtext>XÉ</mtext>
+ </mtd>
+ <mtd>
+ <mtext>Xp</mtext>
+ </mtd>
+ </mtr>
+ </mtable>
+ </math>
+ </p>
+
+ <p>
+ <math>
+ <mtable frame="solid">
+ <mtr>
+ <mtd>
+ <mtext>É</mtext>
+ </mtd>
+ <mtd>
+ <mtext>p</mtext>
+ </mtd>
+ <mtd>
+ <mtext>X</mtext>
+ </mtd>
+ </mtr>
+ <mtr>
+ <mtd>
+ <mtext>pÉ</mtext>
+ </mtd>
+ <mtd>
+ <mtext>XÉ</mtext>
+ </mtd>
+ <mtd>
+ <mtext>Xp</mtext>
+ </mtd>
+ </mtr>
+ </mtable>
+ </math>
+ </p>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/mathml/presentation-markup/direction/direction-006.html b/testing/web-platform/tests/mathml/presentation-markup/direction/direction-006.html
new file mode 100644
index 0000000000..76cdc41471
--- /dev/null
+++ b/testing/web-platform/tests/mathml/presentation-markup/direction/direction-006.html
@@ -0,0 +1,82 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8"/>
+ <title>RTL mtable and mtable with frame</title>
+ <link rel="help" href="https://w3c.github.io/mathml-core/#attributes-common-to-html-and-mathml-elements">
+ <link rel="help" href="https://w3c.github.io/mathml-core/#css-styling">
+ <link rel="help" href="https://w3c.github.io/mathml-core/#tabular-math">
+ <meta name="assert" content="Verify RTL math table renders the same as the column mirrored.">
+ <link rel="match" href="direction-006-ref.html">
+ <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
+ <style>
+ math, math * {
+ font: 25px Ahem;
+ }
+ </style>
+ </head>
+ <body>
+
+ <p>
+ <math dir="rtl">
+ <mtable>
+ <mtr>
+ <mtd>
+ <mtext>X</mtext>
+ </mtd>
+ <mtd>
+ <mtext>p</mtext>
+ </mtd>
+ <mtd>
+ <mtext>É</mtext>
+ </mtd>
+ </mtr>
+ <mtr>
+ <mtd>
+ <mtext>Xp</mtext>
+ </mtd>
+ <mtd>
+ <mtext>XÉ</mtext>
+ </mtd>
+ <mtd>
+ <mtext>pÉ</mtext>
+ </mtd>
+ </mtr>
+ </mtable>
+ </math>
+ </p>
+
+ <p>
+ <math dir="rtl">
+ <mtable frame="solid">
+ <mtr>
+ <mtd>
+ <mtext>X</mtext>
+ </mtd>
+ <mtd>
+ <mtext>p</mtext>
+ </mtd>
+ <mtd>
+ <mtext>É</mtext>
+ </mtd>
+ </mtr>
+ <mtr>
+ <mtd>
+ <mtext>Xp</mtext>
+ </mtd>
+ <mtd>
+ <mtext>XÉ</mtext>
+ </mtd>
+ <mtd>
+ <mtext>pÉ</mtext>
+ </mtd>
+ </mtr>
+ </mtable>
+ </math>
+ </p>
+
+ <script src="/mathml/support/feature-detection.js"></script>
+ <script>MathMLFeatureDetection.ensure_for_match_reftest("has_dir");</script>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/mathml/presentation-markup/direction/direction-007-ref.html b/testing/web-platform/tests/mathml/presentation-markup/direction/direction-007-ref.html
new file mode 100644
index 0000000000..5c77395f20
--- /dev/null
+++ b/testing/web-platform/tests/mathml/presentation-markup/direction/direction-007-ref.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8"/>
+ <title>mo and embellished mrow/munderover (lspace=1em rspace=2em)</title>
+ <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
+ <style>
+ math, math * {
+ font: 25px/1 Ahem;
+ }
+ </style>
+ </head>
+ <body>
+
+ <p>
+ <math>
+ <mtext>p</mtext><mo lspace="2em" rspace="1em">X</mo><mtext>p</mtext>
+ </math>
+ </p>
+
+ <p>
+ <math>
+ <mtext>p</mtext>
+ <mrow><mo lspace="2em" rspace="1em">X</mo></mrow>
+ <mtext>p</mtext>
+ </math>
+ </p>
+
+ <p>
+ <math>
+ <mtext>p</mtext>
+ <munderover>
+ <mo lspace="2em" rspace="1em">X</mo>
+ <mtext>É</mtext>
+ <mtext>É</mtext>
+ </munderover>
+ <mtext>p</mtext>
+ </math>
+ </p>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/mathml/presentation-markup/direction/direction-007.html b/testing/web-platform/tests/mathml/presentation-markup/direction/direction-007.html
new file mode 100644
index 0000000000..3419467ae2
--- /dev/null
+++ b/testing/web-platform/tests/mathml/presentation-markup/direction/direction-007.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8"/>
+ <title>mo and embellished mrow/munderover (lspace=1em rspace=2em)</title>
+ <link rel="help" href="https://w3c.github.io/mathml-core/#attributes-common-to-html-and-mathml-elements">
+ <link rel="help" href="https://w3c.github.io/mathml-core/#css-styling">
+ <link rel="help" href="https://w3c.github.io/mathml-core/#embellished-operators">
+ <link rel="help" href="https://w3c.github.io/mathml-core/#operator-fence-separator-or-accent-mo">
+ <link rel="help" href="https://w3c.github.io/mathml-core/#horizontally-group-sub-expressions-mrow">
+ <link rel="help" href="https://w3c.github.io/mathml-core/#underscripts-and-overscripts-munder-mover-munderover">
+ <meta name="assert" content="Verify that the lspace/rspace on an mo or an embellished mrow/munderover element are switched in RTL mode">
+ <link rel="match" href="direction-007-ref.html">
+ <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
+ <style>
+ math, math * {
+ font: 25px/1 Ahem;
+ }
+ </style>
+ </head>
+ <body>
+
+ <p>
+ <math dir="rtl">
+ <mtext>p</mtext><mo lspace="1em" rspace="2em">X</mo><mtext>p</mtext>
+ </math>
+ </p>
+
+ <p>
+ <math dir="rtl">
+ <mtext>p</mtext>
+ <mrow><mo lspace="1em" rspace="2em">X</mo></mrow>
+ <mtext>p</mtext>
+ </math>
+ </p>
+
+ <p>
+ <math dir="rtl">
+ <mtext>p</mtext>
+ <munderover>
+ <mo lspace="1em" rspace="2em">X</mo>
+ <mtext>É</mtext>
+ <mtext>É</mtext>
+ </munderover>
+ <mtext>p</mtext>
+ </math>
+ </p>
+
+ <script src="/mathml/support/feature-detection.js"></script>
+ <script>MathMLFeatureDetection.ensure_for_match_reftest("has_dir");</script>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/mathml/presentation-markup/direction/direction-008-ref.html b/testing/web-platform/tests/mathml/presentation-markup/direction/direction-008-ref.html
new file mode 100644
index 0000000000..492fa9539a
--- /dev/null
+++ b/testing/web-platform/tests/mathml/presentation-markup/direction/direction-008-ref.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8"/>
+ <title>embellished mfrac (lspace=1em rspace=2em)</title>
+ <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
+ <style>
+ math, math * {
+ font: 25px/1 Ahem;
+ }
+ </style>
+ </head>
+ <body>
+
+ <p>
+ <math>
+ <mtext>p</mtext>
+ <mfrac>
+ <mo lspace="2em" rspace="1em">X</mo>
+ <mtext>É</mtext>
+ </mfrac>
+ <mtext>p</mtext>
+ </math>
+ </p>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/mathml/presentation-markup/direction/direction-008.html b/testing/web-platform/tests/mathml/presentation-markup/direction/direction-008.html
new file mode 100644
index 0000000000..0be8137364
--- /dev/null
+++ b/testing/web-platform/tests/mathml/presentation-markup/direction/direction-008.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8"/>
+ <title>embellished mfrac (lspace=1em rspace=2em)</title>
+ <link rel="help" href="https://w3c.github.io/mathml-core/#attributes-common-to-html-and-mathml-elements">
+ <link rel="help" href="https://w3c.github.io/mathml-core/#css-styling">
+ <link rel="help" href="https://w3c.github.io/mathml-core/#fractions-mfrac">
+ <link rel="help" href="https://w3c.github.io/mathml-core/#embellished-operators">
+ <meta name="assert" content="Verify that the lspace/rspace on an embellished mfrac element are switched in RTL mode">
+ <link rel="match" href="direction-008-ref.html">
+ <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
+ <style>
+ math, math * {
+ font: 25px/1 Ahem;
+ }
+ </style>
+ </head>
+ <body>
+
+ <p>
+ <math dir="rtl">
+ <mtext>p</mtext>
+ <mfrac>
+ <mo lspace="1em" rspace="2em">X</mo>
+ <mtext>É</mtext>
+ </mfrac>
+ <mtext>p</mtext>
+ </math>
+ </p>
+
+ <script src="/mathml/support/feature-detection.js"></script>
+ <script>MathMLFeatureDetection.ensure_for_match_reftest("has_dir");</script>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/mathml/presentation-markup/direction/direction-010-ref.html b/testing/web-platform/tests/mathml/presentation-markup/direction/direction-010-ref.html
new file mode 100644
index 0000000000..4f595ed49f
--- /dev/null
+++ b/testing/web-platform/tests/mathml/presentation-markup/direction/direction-010-ref.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8"/>
+ <title>dir="rtl" VS direction: rtl on math/mrow/mstyle</title>
+ <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
+ <style>
+ math {
+ font: 25px/1 Ahem;
+ }
+ </style>
+ </head>
+ <body>
+
+ <p>
+ <math style="direction: rtl">
+ <mtext>X</mtext>
+ <mtext>p</mtext>
+ <mtext>É</mtext>
+ </math>
+ </p>
+
+ <p>
+ <math>
+ <mrow style="direction: rtl">
+ <mtext>X</mtext>
+ <mtext>p</mtext>
+ <mtext>É</mtext>
+ </mrow>
+ </math>
+ </p>
+
+ <p>
+ <math>
+ <mstyle mathcolor="blue" style="direction: rtl">
+ <mtext>X</mtext>
+ <mtext>p</mtext>
+ <mtext>É</mtext>
+ </mstyle>
+ </math>
+ </p>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/mathml/presentation-markup/direction/direction-010.html b/testing/web-platform/tests/mathml/presentation-markup/direction/direction-010.html
new file mode 100644
index 0000000000..6e92dfda2a
--- /dev/null
+++ b/testing/web-platform/tests/mathml/presentation-markup/direction/direction-010.html
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8"/>
+ <title>dir="rtl" VS direction: rtl on math/mrow/mstyle</title>
+ <link rel="help" href="https://w3c.github.io/mathml-core/#attributes-common-to-html-and-mathml-elements">
+ <link rel="help" href="https://w3c.github.io/mathml-core/#css-styling">
+ <link rel="help" href="https://w3c.github.io/mathml-core/#horizontally-group-sub-expressions-mrow">
+ <link rel="help" href="https://w3c.github.io/mathml-core/#style-change-mstyle">
+ <link rel="help" href="https://w3c.github.io/mathml-core/#the-top-level-math-element">
+ <meta name="assert" content="Verify that math, mrow and mstyle with a dir=rtl attribute render the same as CSS direction right-to-left.">
+ <link rel="match" href="direction-010-ref.html">
+ <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
+ <style>
+ math {
+ font: 25px/1 Ahem;
+ }
+ </style>
+ </head>
+ <body>
+
+ <p>
+ <math dir="rtl">
+ <mtext>X</mtext>
+ <mtext>p</mtext>
+ <mtext>É</mtext>
+ </math>
+ </p>
+
+ <p>
+ <math>
+ <mrow dir="rtl">
+ <mtext>X</mtext>
+ <mtext>p</mtext>
+ <mtext>É</mtext>
+ </mrow>
+ </math>
+ </p>
+
+ <p>
+ <math>
+ <mstyle mathcolor="blue" dir="rtl">
+ <mtext>X</mtext>
+ <mtext>p</mtext>
+ <mtext>É</mtext>
+ </mstyle>
+ </math>
+ </p>
+
+ <script src="/mathml/support/feature-detection.js"></script>
+ <script>MathMLFeatureDetection.ensure_for_match_reftest("has_dir");</script>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/mathml/presentation-markup/direction/direction-overall-ref.html b/testing/web-platform/tests/mathml/presentation-markup/direction/direction-overall-ref.html
new file mode 100644
index 0000000000..5ce6c5c42b
--- /dev/null
+++ b/testing/web-platform/tests/mathml/presentation-markup/direction/direction-overall-ref.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8"/>
+ <title>Verify dir attribute on various containers</title>
+ </head>
+ <body>
+ <p>
+ math:
+ <math>
+ <mspace width="25px" height="25px" mathbackground="blue"/>
+ <mspace width="25px" height="25px" mathbackground="green"/>
+ <mspace width="25px" height="25px" mathbackground="red"/>
+ </math>
+ </p>
+
+ <p>
+ mrow:
+ <math>
+ <mrow>
+ <mspace width="25px" height="25px" mathbackground="blue"/>
+ <mspace width="25px" height="25px" mathbackground="green"/>
+ <mspace width="25px" height="25px" mathbackground="red"/>
+ </mrow>
+ </math>
+ </p>
+
+ <p>
+ mstyle:
+ <math>
+ <mstyle>
+ <mspace width="25px" height="25px" mathbackground="blue"/>
+ <mspace width="25px" height="25px" mathbackground="green"/>
+ <mspace width="25px" height="25px" mathbackground="red"/>
+ </mstyle>
+ </math>
+ </p>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/mathml/presentation-markup/direction/direction-overall.html b/testing/web-platform/tests/mathml/presentation-markup/direction/direction-overall.html
new file mode 100644
index 0000000000..6effb94c54
--- /dev/null
+++ b/testing/web-platform/tests/mathml/presentation-markup/direction/direction-overall.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8"/>
+ <title>Verify dir attribute on various containers</title>
+ <link rel="help" href="https://w3c.github.io/mathml-core/#attributes-common-to-html-and-mathml-elements">
+ <link rel="help" href="https://w3c.github.io/mathml-core/#css-styling">
+ <link rel="help" href="https://w3c.github.io/mathml-core/#the-top-level-math-element">
+ <link rel="help" href="https://w3c.github.io/mathml-core/#horizontally-group-sub-expressions-mrow">
+ <link rel="help" href="https://w3c.github.io/mathml-core/#style-change-mstyle">
+ <meta name="assert" content="Verify dir attribute on various containers.">
+ <link rel="match" href="direction-overall-ref.html">
+ </head>
+ <body>
+
+ <!-- Test dir="rtl" on <math>, <mrow> and <mstyle> elements. The rectangle
+ inside these elements should be displayed right-to-left. -->
+
+ <p>
+ math:
+ <math dir="rtl">
+ <mspace width="25px" height="25px" mathbackground="red"/>
+ <mspace width="25px" height="25px" mathbackground="green"/>
+ <mspace width="25px" height="25px" mathbackground="blue"/>
+ </math>
+ </p>
+
+ <p>
+ mrow:
+ <math>
+ <mrow dir="rtl">
+ <mspace width="25px" height="25px" mathbackground="red"/>
+ <mspace width="25px" height="25px" mathbackground="green"/>
+ <mspace width="25px" height="25px" mathbackground="blue"/>
+ </mrow>
+ </math>
+ </p>
+
+ <p>
+ mstyle:
+ <math>
+ <mstyle dir="rtl">
+ <mspace width="25px" height="25px" mathbackground="red"/>
+ <mspace width="25px" height="25px" mathbackground="green"/>
+ <mspace width="25px" height="25px" mathbackground="blue"/>
+ </mstyle>
+ </math>
+ </p>
+
+ <script src="/mathml/support/feature-detection.js"></script>
+ <script>MathMLFeatureDetection.ensure_for_match_reftest("has_mspace");</script>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/mathml/presentation-markup/direction/direction-token-ref.html b/testing/web-platform/tests/mathml/presentation-markup/direction/direction-token-ref.html
new file mode 100644
index 0000000000..f1895b578a
--- /dev/null
+++ b/testing/web-platform/tests/mathml/presentation-markup/direction/direction-token-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html dir="rtl">
+ <head>
+ <meta charset="utf-8"/>
+ <title>Verify dir attribute on token elements</title>
+ </head>
+ <body>
+
+ <p><math><mtext style="direction: rtl;">חוק \left חסר או חוק \right מיותר</mtext></math></p>
+ <p><math><ms style="direction: rtl;">חוק \left חסר או חוק \right מיותר</ms></math></p>
+ <p><math><mo style="direction: rtl;">חוק \left חסר או חוק \right מיותר</mo></math></p>
+ <p><math><mi style="direction: rtl;">חוק \left חסר או חוק \right מיותר</mi></math></p>
+ <p><math><mn style="direction: rtl;">חוק \left חסר או חוק \right מיותר</mn></math></p>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/mathml/presentation-markup/direction/direction-token.html b/testing/web-platform/tests/mathml/presentation-markup/direction/direction-token.html
new file mode 100644
index 0000000000..58319fbfac
--- /dev/null
+++ b/testing/web-platform/tests/mathml/presentation-markup/direction/direction-token.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html dir="rtl">
+ <head>
+ <meta charset="utf-8"/>
+ <title>Verify dir attribute on token elements</title>
+ <link rel="help" href="https://w3c.github.io/mathml-core/#attributes-common-to-html-and-mathml-elements">
+ <link rel="help" href="https://w3c.github.io/mathml-core/#css-styling">
+ <link rel="help" href="https://w3c.github.io/mathml-core/#token-elements">
+ <meta name="assert" content="Verify dir attribute on various token elements.">
+ <link rel="match" href="direction-token-ref.html">
+ </head>
+ <body>
+
+ <!-- Test dir="rtl" on MathML token elements. The text contains RTL and
+ LTR characters, so the attribute is needed to specify the actual
+ direction. -->
+
+ <p><math><mtext dir="rtl">חוק \left חסר או חוק \right מיותר</mtext></math></p>
+ <p><math><ms dir="rtl">חוק \left חסר או חוק \right מיותר</ms></math></p>
+ <p><math><mo dir="rtl">חוק \left חסר או חוק \right מיותר</mo></math></p>
+ <p><math><mi dir="rtl">חוק \left חסר או חוק \right מיותר</mi></math></p>
+ <p><math><mn dir="rtl">חוק \left חסר או חוק \right מיותר</mn></math></p>
+
+ <script src="/mathml/support/feature-detection.js"></script>
+ <script>MathMLFeatureDetection.ensure_for_match_reftest("has_dir");</script>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/mathml/presentation-markup/direction/direction.html b/testing/web-platform/tests/mathml/presentation-markup/direction/direction.html
new file mode 100644
index 0000000000..dfb1671e4c
--- /dev/null
+++ b/testing/web-platform/tests/mathml/presentation-markup/direction/direction.html
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<html dir="rtl">
+<head>
+<meta charset="utf-8"/>
+<title>Verify computed direction</title>
+<link rel="help" href="https://w3c.github.io/mathml-core/#attributes-common-to-html-and-mathml-elements">
+<link rel="help" href="https://w3c.github.io/mathml-core/#the-top-level-math-element">
+<meta name="assert" content="Verify computed direction value.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+ setup({ explicit_done: true });
+ window.addEventListener("load", runTests);
+ function runTests() {
+ test(function() {
+ assert_equals(window.getComputedStyle(document.getElementById('x1')).direction, "ltr");
+ assert_equals(window.getComputedStyle(document.getElementById('x2')).direction, "ltr");
+ assert_equals(window.getComputedStyle(document.getElementById('x3')).direction, "ltr");
+ assert_equals(window.getComputedStyle(document.getElementById('x4')).direction, "rtl");
+ }, "Check direction");
+
+ done();
+ }
+</script>
+</head>
+<body>
+ <!-- Test the CSS direction and dir attribute on the <math> element. It
+ should be "ltr", except if an explicit dir="rtl" is used. -->
+
+ <p>שורשי משוואה מודגשת זו <math id="x1"> <mrow> <msup> <mi>y</mi> <mn>3</mn> </msup> <mo>+</mo> <mi>p</mi> <mi>y</mi> <mo>+</mo> <mi>q</mi> <mo>=</mo> <mn>0</mn> </mrow> </math> מודגשים גם הם</p>
+
+ <p>שורשי משוואה מודגשת זו <math id="x2" dir="ltr"> <mrow> <msup> <mi>y</mi> <mn>3</mn> </msup> <mo>+</mo> <mi>p</mi> <mi>y</mi> <mo>+</mo> <mi>q</mi> <mo>=</mo> <mn>0</mn> </mrow> </math> מודגשים גם הם</p>
+
+ <p>שורשי משוואה מודגשת זו <math id="x3" dir="invalid"> <mrow> <msup> <mi>y</mi> <mn>3</mn> </msup> <mo>+</mo> <mi>p</mi> <mi>y</mi> <mo>+</mo> <mi>q</mi> <mo>=</mo> <mn>0</mn> </mrow> </math> מודגשים גם הם</p>
+
+ <p>שורשי משוואה מודגשת זו <math id="x4" dir="rtl"> <mrow> <msup> <mi>y</mi> <mn>3</mn> </msup> <mo>+</mo> <mi>p</mi> <mi>y</mi> <mo>+</mo> <mi>q</mi> <mo>=</mo> <mn>0</mn> </mrow> </math> מודגשים גם הם</p>
+
+</body>
+</html>