Bug 1573775 - Export a few MathML dir reftests to WPT. r=emilio
authorFrédéric Wang <fwang@igalia.com>
Wed, 14 Aug 2019 14:17:43 +0000
changeset 488158 c928408c3402f71c9a1bf795147bfb4bfa21b580
parent 488157 e777dd79ae26a8d420083de3a5b774aa4a6bdaca
child 488159 5d42edca79d4b5a1a13647d151dfb989dd9bb507
push id113904
push userncsoregi@mozilla.com
push dateThu, 15 Aug 2019 19:41:00 +0000
treeherdermozilla-inbound@b283a7ef186c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersemilio
bugs1573775, 787215
milestone70.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1573775 - Export a few MathML dir reftests to WPT. r=emilio * Tweak headers to add title and WPT meta tags. * Simplify text content and use the Ahem font to avoid "random" result. * Remove dir-11 since it has already been exported to mathml/relations/css-styling/dynamic-dir-1.html by @bkardell * Move dir-10 to mathml/presentation-markup/direction/direction-010.html * Move dir-9 to mathml/presentation-markup/direction/direction-009.html and add a .ini file for the corresponding failure expectation (bug 787215). * Move dir-8 to mathml/presentation-markup/direction/direction-008.html and add a .ini file for the corresponding failure expectation. * Move dir-7 to mathml/presentation-markup/direction/direction-007.html * Move dir-6 to mathml/presentation-markup/direction/direction-006.html Differential Revision: https://phabricator.services.mozilla.com/D41922
layout/reftests/mathml/dir-10-ref.html
layout/reftests/mathml/dir-10.html
layout/reftests/mathml/dir-11-ref.html
layout/reftests/mathml/dir-11.html
layout/reftests/mathml/dir-6-ref.html
layout/reftests/mathml/dir-6.html
layout/reftests/mathml/dir-7-ref.html
layout/reftests/mathml/dir-7.html
layout/reftests/mathml/dir-8-ref.html
layout/reftests/mathml/dir-8.html
layout/reftests/mathml/dir-9-ref.html
layout/reftests/mathml/dir-9.html
layout/reftests/mathml/reftest.list
testing/web-platform/meta/mathml/presentation-markup/direction/direction-008.html.ini
testing/web-platform/meta/mathml/presentation-markup/direction/direction-009.html.ini
testing/web-platform/tests/mathml/presentation-markup/direction/direction-006-ref.html
testing/web-platform/tests/mathml/presentation-markup/direction/direction-006.html
testing/web-platform/tests/mathml/presentation-markup/direction/direction-007-ref.html
testing/web-platform/tests/mathml/presentation-markup/direction/direction-007.html
testing/web-platform/tests/mathml/presentation-markup/direction/direction-008-ref.html
testing/web-platform/tests/mathml/presentation-markup/direction/direction-008.html
testing/web-platform/tests/mathml/presentation-markup/direction/direction-009-ref.html
testing/web-platform/tests/mathml/presentation-markup/direction/direction-009.html
testing/web-platform/tests/mathml/presentation-markup/direction/direction-010-ref.html
testing/web-platform/tests/mathml/presentation-markup/direction/direction-010.html
deleted file mode 100644
--- a/layout/reftests/mathml/dir-10-ref.html
+++ /dev/null
@@ -1,41 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <head><title>Test direction: rtl</title></head>
-  <body>
-    <p>
-      math:
-      <math style="direction: rtl">
-        <mi>a</mi>
-        <mi>b</mi>
-        <mi>c</mi>
-      </math>
-    </p>
-
-    <p>
-      mrow:
-      <math>
-        <mrow style="direction: rtl">
-          <mi>z</mi>
-          <mtext>X</mtext>
-          <mtext>Y</mtext>
-          <mtext>Z</mtext>
-          <mi>a</mi>
-        </mrow>
-      </math>
-    </p>
-
-    <p>
-      mstyle(mathcolor=blue):
-      <math>
-        <mstyle mathcolor="blue" style="direction: rtl">
-          <mi>a</mi>
-          <mo>+</mo>
-          <mn>3</mo>
-          <mo>+</mo>
-          <mn>9</mn>
-        </mstyle>
-      </math>
-    </p>
-
-  </body>
-</html>
deleted file mode 100644
--- a/layout/reftests/mathml/dir-10.html
+++ /dev/null
@@ -1,41 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <head><title>Test direction: rtl</title></head>
-  <body>
-    <p>
-      math:
-      <math dir="rtl">
-        <mi>a</mi>
-        <mi>b</mi>
-        <mi>c</mi>
-      </math>
-    </p>
-
-    <p>
-      mrow:
-      <math>
-        <mrow dir="rtl">
-          <mi>z</mi>
-          <mtext>X</mtext>
-          <mtext>Y</mtext>
-          <mtext>Z</mtext>
-          <mi>a</mi>
-        </mrow>
-      </math>
-    </p>
-
-    <p>
-      mstyle(mathcolor=blue):
-      <math>
-        <mstyle mathcolor="blue" dir="rtl">
-          <mi>a</mi>
-          <mo>+</mo>
-          <mn>3</mo>
-          <mo>+</mo>
-          <mn>9</mn>
-        </mstyle>
-      </math>
-    </p>
-
-  </body>
-</html>
deleted file mode 100644
--- a/layout/reftests/mathml/dir-11-ref.html
+++ /dev/null
@@ -1,76 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <head><title>Test direction: dynamic change</title></head>
-  <body>
-
-    <p>
-      math:
-      <math dir="rtl">
-        <mi>a</mi>
-        <mi>b</mi>
-        <mi>c</mi>
-      </math>
-      <math dir="rtl">
-        <mi>a</mi>
-        <mi>b</mi>
-        <mi>c</mi>
-      </math>
-      <math>
-        <mi>a</mi>
-        <mi>b</mi>
-        <mi>c</mi>
-      </math>
-    </p>
-
-    <p>
-      mstyle:
-      <math>
-        <mstyle dir="rtl">
-          <mi>a</mi>
-          <mi>b</mi>
-          <mi>c</mi>
-        </mstyle>
-      </math>
-      <math>
-        <mstyle dir="rtl">
-          <mi>a</mi>
-          <mi>b</mi>
-          <mi>c</mi>
-        </mstyle>
-      </math>
-      <math>
-        <mstyle>
-          <mi>a</mi>
-          <mi>b</mi>
-          <mi>c</mi>
-        </mstyle>
-      </math>
-    </p>
-
-    <p>
-      mrow:
-      <math>
-        <mrow dir="rtl">
-          <mi>a</mi>
-          <mi>b</mi>
-          <mi>c</mi>
-        </mrow>
-      </math>
-      <math>
-        <mrow dir="rtl">
-          <mi>a</mi>
-          <mi>b</mi>
-          <mi>c</mi>
-        </mrow>
-      </math>
-      <math>
-        <mrow>
-          <mi>a</mi>
-          <mi>b</mi>
-          <mi>c</mi>
-        </mrow>
-      </math>
-    </p>
-
-  </body>
-</html>
deleted file mode 100644
--- a/layout/reftests/mathml/dir-11.html
+++ /dev/null
@@ -1,98 +0,0 @@
-<!DOCTYPE html>
-<html class="reftest-wait">
-  <head><title>Test direction: dynamic change</title></head>
-  <body>
-    <p>
-      math:
-      <math>
-        <mi>a</mi>
-        <mi>b</mi>
-        <mi>c</mi>
-      </math>
-      <math dir="ltr">
-        <mi>a</mi>
-        <mi>b</mi>
-        <mi>c</mi>
-      </math>
-      <math dir="rtl">
-        <mi>a</mi>
-        <mi>b</mi>
-        <mi>c</mi>
-      </math>
-    </p>
-
-    <p>
-      mstyle:
-      <math>
-        <mstyle>
-          <mi>a</mi>
-          <mi>b</mi>
-          <mi>c</mi>
-        </mstyle>
-      </math>
-      <math>
-        <mstyle dir="ltr">
-          <mi>a</mi>
-          <mi>b</mi>
-          <mi>c</mi>
-        </mstyle>
-      </math>
-      <math>
-        <mstyle dir="rtl">
-          <mi>a</mi>
-          <mi>b</mi>
-          <mi>c</mi>
-        </mstyle>
-      </math>
-    </p>
-
-    <p>
-      mrow:
-      <math>
-        <mrow>
-          <mi>a</mi>
-          <mi>b</mi>
-          <mi>c</mi>
-        </mrow>
-      </math>
-      <math>
-        <mrow dir="ltr">
-          <mi>a</mi>
-          <mi>b</mi>
-          <mi>c</mi>
-        </mrow>
-      </math>
-      <math>
-        <mrow dir="rtl">
-          <mi>a</mi>
-          <mi>b</mi>
-          <mi>c</mi>
-        </mrow>
-      </math>
-    </p>
-
-    <script>
-      function doTest()
-      {
-      var x = document.getElementsByTagName("math");
-      x[0].setAttribute("dir", "rtl");
-      x[1].setAttribute("dir", "rtl");
-      x[2].removeAttribute("dir");
-
-      x = document.getElementsByTagName("mstyle");
-      x[0].setAttribute("dir", "rtl");
-      x[1].setAttribute("dir", "rtl");
-      x[2].removeAttribute("dir");
- 
-      x = document.getElementsByTagName("mrow");
-      x[0].setAttribute("dir", "rtl");
-      x[1].setAttribute("dir", "rtl");
-      x[2].removeAttribute("dir");
-
-      document.documentElement.removeAttribute("class");
-      }
-      window.addEventListener("MozReftestInvalidate", doTest);
-    </script>
-
-  </body>
-</html>
deleted file mode 100644
--- a/layout/reftests/mathml/dir-6.html
+++ /dev/null
@@ -1,67 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <head><title>Test dir=rtl</title></head>
-  <body>
-
-    <p>
-      mtable:
-      <math dir="rtl">
-        <mtable>
-          <mtr>
-            <mtd>
-              <mtext>a</mtext>
-            </mtd>
-            <mtd>
-              <mtext>b</mtext>
-            </mtd>
-            <mtd>
-              <mtext>c</mtext>
-            </mtd>
-          </mtr>
-          <mtr>
-            <mtd>
-              <mtext>d</mtext>
-            </mtd>
-            <mtd>
-              <mtext>e</mtext>
-            </mtd>
-            <mtd>
-              <mtext>f</mtext>
-            </mtd>
-          </mtr>
-        </mtable>
-      </math>
-    </p>
-
-    <p>
-      mtable:
-      <math dir="rtl">
-        <mtable frame="solid">
-          <mtr>
-            <mtd>
-              <mtext>a</mtext>
-            </mtd>
-            <mtd>
-              <mtext>b</mtext>
-            </mtd>
-            <mtd>
-              <mtext>c</mtext>
-            </mtd>
-          </mtr>
-          <mtr>
-            <mtd>
-              <mtext>d</mtext>
-            </mtd>
-            <mtd>
-              <mtext>e</mtext>
-            </mtd>
-            <mtd>
-              <mtext>f</mtext>
-            </mtd>
-          </mtr>
-        </mtable>
-      </math>
-    </p>
-
-  </body>
-</html>
deleted file mode 100644
--- a/layout/reftests/mathml/dir-7-ref.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <head><title>Test dir=rtl</title></head>
-  <body>
-
-    <p>
-      mo (lspace=1em rspace=2em):
-      <math>
-        <mtext>_</mtext><mo lspace="2em" rspace="1em">+</mo><mtext>_</mtext>
-      </math>
-    </p>
-
-    <p>
-      embellished mrow (lspace=1em rspace=2em):
-      <math>
-        <mtext>_</mtext>
-        <mrow><mo lspace="2em" rspace="1em">+</mo></mrow>
-        <mtext>_</mtext>
-      </math>
-    </p>
-
-    <p>
-      embellished munderover (lspace=1em rspace=2em):
-      <math>
-        <mtext>_</mtext>
-        <munderover>
-          <mo lspace="2em" rspace="1em">+</mo>
-          <mtext>|</mtext>
-          <mtext>|</mtext>
-        </munderover>
-        <mtext>_</mtext>
-      </math>
-    </p>
-
-  </body>
-</html>
deleted file mode 100644
--- a/layout/reftests/mathml/dir-7.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <head><title>Test dir=rtl</title></head>
-  <body>
-
-    <p>
-      mo (lspace=1em rspace=2em):
-      <math dir="rtl">
-        <mtext>_</mtext><mo lspace="1em" rspace="2em">+</mo><mtext>_</mtext>
-      </math>
-    </p>
-
-    <p>
-      embellished mrow (lspace=1em rspace=2em):
-      <math dir="rtl">
-        <mtext>_</mtext>
-        <mrow><mo lspace="1em" rspace="2em">+</mo></mrow>
-        <mtext>_</mtext>
-      </math>
-    </p>
-
-    <p>
-      embellished munderover (lspace=1em rspace=2em):
-      <math dir="rtl">
-        <mtext>_</mtext>
-        <munderover>
-          <mo lspace="1em" rspace="2em">+</mo>
-          <mtext>|</mtext>
-          <mtext>|</mtext>
-        </munderover>
-        <mtext>_</mtext>
-      </math>
-    </p>
-
-  </body>
-</html>
deleted file mode 100644
--- a/layout/reftests/mathml/dir-8-ref.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <head><title>Test dir=rtl</title></head>
-  <body>
-     
-    <p>
-      embellished mfrac (lspace=1em rspace=2em):
-      <math
-        <mtext>_</mtext>
-        <mfrac>
-          <mo lspace="2em" rspace="1em">+</mo>
-          <mtext>|</mtext>
-        </mfrac>
-        <mtext>_</mtext>
-      </math>
-    </p>
-
-  </body>
-</html>
deleted file mode 100644
--- a/layout/reftests/mathml/dir-8.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <head><title>Test dir=rtl</title></head>
-  <body>
-
-    <p>
-      embellished mfrac (lspace=1em rspace=2em):
-      <math dir="rtl">
-        <mtext>_</mtext>
-        <mfrac>
-          <mo lspace="1em" rspace="2em">+</mo>
-          <mtext>|</mtext>
-        </mfrac>
-        <mtext>_</mtext>
-      </math>
-    </p>
-
-  </body>
-</html>
deleted file mode 100644
--- a/layout/reftests/mathml/dir-9-ref.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <head><title>Test dir=rtl</title></head>
-  <body>
-    <p>ms lquote="A" rquote="B":
-      <math>
-	<ms lquote="B" rquote="A">___</ms>
-      </math>
-    </p>
-  </body>
-</html>
deleted file mode 100644
--- a/layout/reftests/mathml/dir-9.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <head><title>Test dir=rtl</title></head>
-  <body>
-    <p>ms lquote="A" rquote="B":
-      <math dir="rtl">
-	<ms lquote="A" rquote="B">___</ms>
-      </math>
-    </p>
-  </body>
-</html>
--- a/layout/reftests/mathml/reftest.list
+++ b/layout/reftests/mathml/reftest.list
@@ -1,20 +1,14 @@
 == dir-1.html dir-1-ref.html
 random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == dir-2.html dir-2-ref.html # Bug 1392106
 random-if(gtkWidget) == dir-3.html dir-3-ref.html # bug 1309426
 == dir-4.html dir-4-ref.html
 == dir-5.html dir-5-ref.html
-fuzzy-if(cocoaWidget,0-135,0-56) == dir-6.html dir-6-ref.html
 fuzzy-if(cocoaWidget,0-135,0-56) == dir-6a.html dir-6a-ref.html
-random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == dir-7.html dir-7-ref.html # Bug 1392106
-fails == dir-8.html dir-8-ref.html
-fails == dir-9.html dir-9-ref.html # Bug 787215
-random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == dir-10.html dir-10-ref.html # Bug 1392106
-== dir-11.html dir-11-ref.html
 == css-spacing-1.html css-spacing-1-ref.html
 pref(mathml.disabled,true) == disabled-scriptlevel-1.html disabled-scriptlevel-1-ref.html
 pref(mathml.disabled,true) == disabled-scriptlevel-1.xhtml disabled-scriptlevel-1-ref.xhtml
 random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == displaystyle-1.html displaystyle-1-ref.html # Bug 1392106
 random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == displaystyle-2.html displaystyle-2-ref.html # Bug 1392106
 random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == displaystyle-3.html displaystyle-3-ref.html # Bug 1392106
 random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == displaystyle-4.html displaystyle-4-ref.html # Bug 1392106
 random-if(smallScreen&&Android) fuzzy(0-255,0-200) fuzzy-if(webrender&&winWidget,114-255,265-304) fuzzy-if(webrender&&OSX,87-87,242-242) == mirror-op-1.html mirror-op-1-ref.html
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/mathml/presentation-markup/direction/direction-008.html.ini
@@ -0,0 +1,3 @@
+[direction-008.html]
+  expected:
+    FAIL
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/mathml/presentation-markup/direction/direction-009.html.ini
@@ -0,0 +1,4 @@
+[direction-009.html]
+  expected:
+    FAIL
+  bug: 787215
rename from layout/reftests/mathml/dir-6-ref.html
rename to testing/web-platform/tests/mathml/presentation-markup/direction/direction-006-ref.html
--- a/layout/reftests/mathml/dir-6-ref.html
+++ b/testing/web-platform/tests/mathml/presentation-markup/direction/direction-006-ref.html
@@ -1,67 +1,74 @@
 <!DOCTYPE html>
 <html>
-  <head><title>Test dir=rtl</title></head>
+  <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>
-      mtable:
       <math>
         <mtable>
           <mtr>
             <mtd>
-              <mtext>c</mtext>
+              <mtext>É</mtext>
             </mtd>
             <mtd>
-              <mtext>b</mtext>
+              <mtext>p</mtext>
             </mtd>
             <mtd>
-              <mtext>a</mtext>
+              <mtext>X</mtext>
             </mtd>
           </mtr>
           <mtr>
             <mtd>
-              <mtext>f</mtext>
+              <mtext>pÉ</mtext>
             </mtd>
             <mtd>
-              <mtext>e</mtext>
+              <mtext>XÉ</mtext>
             </mtd>
             <mtd>
-              <mtext>d</mtext>
+              <mtext>Xp</mtext>
             </mtd>
           </mtr>
         </mtable>
       </math>
     </p>
 
     <p>
-      mtable:
       <math>
         <mtable frame="solid">
           <mtr>
             <mtd>
-              <mtext>c</mtext>
+              <mtext>É</mtext>
             </mtd>
             <mtd>
-              <mtext>b</mtext>
+              <mtext>p</mtext>
             </mtd>
             <mtd>
-              <mtext>a</mtext>
+              <mtext>X</mtext>
             </mtd>
           </mtr>
           <mtr>
             <mtd>
-              <mtext>f</mtext>
+              <mtext>pÉ</mtext>
             </mtd>
             <mtd>
-              <mtext>e</mtext>
+              <mtext>XÉ</mtext>
             </mtd>
             <mtd>
-              <mtext>d</mtext>
+              <mtext>Xp</mtext>
             </mtd>
           </mtr>
         </mtable>
       </math>
     </p>
 
   </body>
 </html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/mathml/presentation-markup/direction/direction-006.html
@@ -0,0 +1,79 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8"/>
+    <title>RTL mtable and mtable with frame</title>
+    <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#attributes-common-to-html-and-mathml-elements">
+    <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#css-styling">
+    <link rel="help" href="https://mathml-refresh.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>
+
+  </body>
+</html>
new file mode 100644
--- /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>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/mathml/presentation-markup/direction/direction-007.html
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8"/>
+    <title>mo and embellished mrow/munderover (lspace=1em rspace=2em)</title>
+    <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#attributes-common-to-html-and-mathml-elements">
+    <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#css-styling">
+    <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#embellished-operators">
+    <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-fence-separator-or-accent-mo">
+    <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#horizontally-group-sub-expressions-mrow">
+    <link rel="help" href="https://mathml-refresh.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>
+
+  </body>
+</html>
new file mode 100644
--- /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>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/mathml/presentation-markup/direction/direction-008.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8"/>
+    <title>embellished mfrac (lspace=1em rspace=2em)</title>
+    <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#attributes-common-to-html-and-mathml-elements">
+    <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#css-styling">
+    <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#fractions-mfrac">
+    <link rel="help" href="https://mathml-refresh.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>
+
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/mathml/presentation-markup/direction/direction-009-ref.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8"/>
+    <title>RTL ms lquote="X" rquote="p"</title>
+    <style>
+      math {
+          font: 25px/1 Ahem;
+      }
+    </style>
+  </head>
+  <body>
+
+    <p>
+      <math>
+        <ms lquote="p" rquote="X">É</ms>
+      </math>
+    </p>
+
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/mathml/presentation-markup/direction/direction-009.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8"/>
+    <title>RTL ms lquote="X" rquote="p"</title>
+    <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#attributes-common-to-html-and-mathml-elements">
+    <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#css-styling">
+    <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#string-literal-ms">
+    <meta name="assert" content="Verify that a RTL ms element renders the same as if its left and right quotes were switched.">
+    <link rel="match" href="direction-009-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">
+        <ms lquote="X" rquote="p">É</ms>
+      </math>
+    </p>
+
+  </body>
+</html>
new file mode 100644
--- /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>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/mathml/presentation-markup/direction/direction-010.html
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8"/>
+    <title>dir="rtl" VS direction: rtl on math/mrow/mstyle</title>
+    <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#attributes-common-to-html-and-mathml-elements">
+    <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#css-styling">
+    <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#horizontally-group-sub-expressions-mrow">
+    <link rel="help" href="https://mathml-refresh.github.io/mathml-core/#style-change-mstyle">
+    <link rel="help" href="https://mathml-refresh.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>
+
+  </body>
+</html>