Bug 727804 - Add another mfenced fence size testcase r=fredw
authorJames Kitchener <jkitch.bug@gmail.com>
Fri, 24 Oct 2014 19:08:00 +0200
changeset 212431 ec42457652668bcbd8dc7ae1d3cac77234d76b59
parent 212430 8f5051232a06a814289fb9967f4c2b7f2394aa9b
child 212432 e122c5300afc428c5f8b725900ca235649c81db5
push id27710
push usercbook@mozilla.com
push dateMon, 27 Oct 2014 14:52:01 +0000
treeherdermozilla-central@d65d20dc0ac2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfredw
bugs727804
milestone36.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 727804 - Add another mfenced fence size testcase r=fredw
layout/reftests/mathml/mfenced-12-ref.html
layout/reftests/mathml/mfenced-12.html
layout/reftests/mathml/reftest.list
new file mode 100644
--- /dev/null
+++ b/layout/reftests/mathml/mfenced-12-ref.html
@@ -0,0 +1,40 @@
+<!doctype html>
+<html class="reftest-wait">
+
+<math style="font-size:25px; position: absolute; top: 10px; left:10px;">
+  <mrow id="outer">
+    <mo>(</mo>
+    <mrow>
+      <mn id="a" style="visibility:hidden;">a</mn>
+      <mo>&amp;</mo>
+      <mn id="c" style="visibility:hidden;">c</mn>
+      </mrow>
+    <mo>)</mo>
+  </mrow>
+</math>
+
+<!-- Implementation kludge.  <mfenced> renders the position of the ampersand in
+     a slightly different position compared to <mo>+<mrow>.
+     In this test we are only concerned about the size of the fences "(" and
+     ")", so the ampersand gets redacted. -->
+<div id="div" style="position: absolute; background:black; top: 0px;
+                     height: 120px;"></div>
+
+<script>
+  function doTest()
+  {
+    a = document.getElementById("a");
+    c = document.getElementById("c");
+    div = document.getElementById("div");
+    outer = document.getElementById("outer");
+
+    left = a.getBoundingClientRect().left;  // div's left
+    div.style.left = left + 'px';
+    div.style.width = (c.getBoundingClientRect().right - left ) + 'px';
+
+    document.documentElement.removeAttribute("class");
+   }
+   window.addEventListener("MozReftestInvalidate", doTest, false);
+</script>
+
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/mathml/mfenced-12.html
@@ -0,0 +1,35 @@
+<!doctype html>
+<html class="reftest-wait">
+
+<math style="font-size:25px; position: absolute; top: 10px; left:10px;">
+  <mfenced id="outer" separators="&amp;">
+      <mn id="a" style="visibility:hidden;">a</mn>
+      <mn id="c" style="visibility:hidden;">c</mn>
+  </mfenced>
+</math>
+
+<!-- Implementation kludge.  <mfenced> renders the position of the ampersand in
+     a slightly different position compared to <mo>+<mrow>.
+     In this test we are only concerned about the size of the fences "(" and
+     ")", so the ampersand gets redacted. -->
+<div id="div" style="position: absolute; background:black; top: 0px;
+                     height: 120px;"></div>
+
+<script>
+  function doTest()
+  {
+    a = document.getElementById("a");
+    c = document.getElementById("c");
+    div = document.getElementById("div");
+    outer = document.getElementById("outer");
+
+    left = a.getBoundingClientRect().left;  // div's left
+    div.style.left = left + 'px';
+    div.style.width = (c.getBoundingClientRect().right - left ) + 'px';
+
+    document.documentElement.removeAttribute("class");
+   }
+   window.addEventListener("MozReftestInvalidate", doTest, false);
+</script>
+
+</html>
--- a/layout/reftests/mathml/reftest.list
+++ b/layout/reftests/mathml/reftest.list
@@ -33,16 +33,17 @@ skip-if(B2G&&browserIsRemote) random-if(
 == mfenced-5c.xhtml mfenced-5-ref.xhtml
 == mfenced-5d.xhtml mfenced-5-ref.xhtml
 == mfenced-6.html mfenced-6-ref.html
 == mfenced-7.html mfenced-7-ref.html
 != mfenced-8.html mfenced-8-ref.html
 == mfenced-9.html mfenced-9-ref.html
 fails-if(/^Windows\x20NT\x205\.1/.test(http.oscpu)) == mfenced-10.html mfenced-10-ref.html # Windows versions without Cambria Math, see bug 670592
 fails-if(winWidget&&d2d) == mfenced-11.html mfenced-11-ref.html
+== mfenced-12.html mfenced-12-ref.html
 == mi-mathvariant-1.xhtml mi-mathvariant-1-ref.xhtml
 == mi-mathvariant-2.xhtml mi-mathvariant-2-ref.xhtml
 != mi-mathvariant-3.html mi-mathvariant-3-ref.html
 != non-spacing-accent-1.xhtml non-spacing-accent-1-ref.xhtml
 == overbar-width-1.xhtml overbar-width-1-ref.xhtml
 skip-if(B2G) == quotes-1.xhtml quotes-1-ref.xhtml
 != stretchy-underbar-1.xhtml stretchy-underbar-1-ref.xhtml
 != stretchy-munderover-1a.html stretchy-munderover-1-ref.html