summaryrefslogtreecommitdiffstats
path: root/layout/mathml/tests/test_bug330964.html
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /layout/mathml/tests/test_bug330964.html
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'layout/mathml/tests/test_bug330964.html')
-rw-r--r--layout/mathml/tests/test_bug330964.html98
1 files changed, 98 insertions, 0 deletions
diff --git a/layout/mathml/tests/test_bug330964.html b/layout/mathml/tests/test_bug330964.html
new file mode 100644
index 000000000..d0599a97b
--- /dev/null
+++ b/layout/mathml/tests/test_bug330964.html
@@ -0,0 +1,98 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=330964
+-->
+<head>
+ <title>Test for Bug 706406</title>
+ <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+</head>
+<body>
+<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=330964">Mozilla Bug 330964</a>
+<p id="display"></p>
+
+<math>
+ <mtable framespacing="7px 20px" frame="solid" rowspacing="11px 27px" columnspacing="5px 16px"
+ style="border-width: 2px;" id="mtable0">
+ <mtr>
+ <mtd id="mtd0">
+ <mn>X</mn>
+ </mtd>
+ <mtd id="mtd1">
+ <mn>X</mn>
+ </mtd>
+ <mtd id="mtd2">
+ <mn>X</mn>
+ </mtd>
+ </mtr>
+ <mtr>
+ <mtd id="mtd3">
+ <mn>X</mn>
+ </mtd>
+ <mtd id="mtd4">
+ <mn>X</mn>
+ </mtd>
+ <mtd id="mtd5">
+ <mn>X</mn>
+ </mtd>
+ </mtr>
+ <mtr>
+ <mtd id="mtd6">
+ <mn>X</mn>
+ </mtd>
+ <mtd id="mtd7">
+ <mn>X</mn>
+ </mtd>
+ <mtd id="mtd8">
+ <mn>X</mn>
+ </mtd>
+ </mtr>
+ </mtable>
+</math>
+
+<pre id="test">
+<script type="application/javascript">
+
+ var epsilon = 2;
+ function almostEqual(x, y) { return Math.abs(x - y) < epsilon; }
+
+ rectTable = $("mtable0").getBoundingClientRect();
+ rect0 = $("mtd0").getBoundingClientRect();
+ rect1 = $("mtd1").getBoundingClientRect();
+ rect2 = $("mtd2").getBoundingClientRect();
+ rect3 = $("mtd3").getBoundingClientRect();
+ rect4 = $("mtd4").getBoundingClientRect();
+ rect5 = $("mtd5").getBoundingClientRect();
+ rect6 = $("mtd6").getBoundingClientRect();
+ rect7 = $("mtd7").getBoundingClientRect();
+ rect8 = $("mtd8").getBoundingClientRect();
+ ok(almostEqual(rect1.left - rect0.right, 5), "columnspacing wonky");
+ ok(almostEqual(rect2.left - rect1.right, 16), "columnspacing wonky");
+ ok(almostEqual(rect4.left - rect3.right, 5), "columnspacing wonky");
+ ok(almostEqual(rect5.left - rect4.right, 16), "columnspacing wonky");
+ ok(almostEqual(rect7.left - rect6.right, 5), "columnspacing wonky");
+ ok(almostEqual(rect8.left - rect7.right, 16), "columnspacing wonky");
+ ok(almostEqual(rect3.top - rect0.bottom, 11), "rowspacing wonky");
+ ok(almostEqual(rect4.top - rect1.bottom, 11), "rowspacing wonky");
+ ok(almostEqual(rect5.top - rect2.bottom, 11), "rowspacing wonky");
+ ok(almostEqual(rect6.top - rect3.bottom, 27), "rowspacing wonky");
+ ok(almostEqual(rect7.top - rect4.bottom, 27), "rowspacing wonky");
+ ok(almostEqual(rect8.top - rect5.bottom, 27), "rowspacing wonky");
+ // Remember to subtract border
+ ok(almostEqual(rect0.left - rectTable.left - 2, 7), "framespacing left wonky");
+ ok(almostEqual(rect3.left - rectTable.left - 2, 7), "framespacing left wonky");
+ ok(almostEqual(rect6.left - rectTable.left - 2, 7), "framespacing left wonky");
+ ok(almostEqual(rect0.top - rectTable.top - 2, 20), "framespacing top wonky");
+ ok(almostEqual(rect1.top - rectTable.top - 2, 20), "framespacing top wonky");
+ ok(almostEqual(rect2.top - rectTable.top - 2, 20), "framespacing top wonky");
+ ok(almostEqual(rectTable.bottom - rect6.bottom - 2, 20), "framespacing bottom wonky");
+ ok(almostEqual(rectTable.bottom - rect7.bottom - 2, 20), "framespacing bottom wonky");
+ ok(almostEqual(rectTable.bottom - rect8.bottom - 2, 20), "framespacing bottom wonky");
+ ok(almostEqual(rectTable.right - rect2.right - 2, 7), "framespacing right wonky");
+ ok(almostEqual(rectTable.right - rect5.right - 2, 7), "framespacing right wonky");
+ ok(almostEqual(rectTable.right - rect8.right - 2, 7), "framespacing right wonky");
+</script>
+</pre>
+</body>
+</html>