summaryrefslogtreecommitdiffstats
path: root/layout/mathml/tests/stretchy-and-large-operators.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/stretchy-and-large-operators.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/stretchy-and-large-operators.html')
-rw-r--r--layout/mathml/tests/stretchy-and-large-operators.html88
1 files changed, 88 insertions, 0 deletions
diff --git a/layout/mathml/tests/stretchy-and-large-operators.html b/layout/mathml/tests/stretchy-and-large-operators.html
new file mode 100644
index 000000000..13fe14aa7
--- /dev/null
+++ b/layout/mathml/tests/stretchy-and-large-operators.html
@@ -0,0 +1,88 @@
+<!-- -*- mode: HTML; tab-width: 2; indent-tabs-mode: nil; -*- -->
+<!-- vim: set tabstop=2 expandtab shiftwidth=2 textwidth=80: -->
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Test Stretchy and Large Operators</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
+ <script type="text/javascript"
+ src="stretchy-and-large-operators.js"></script>
+ <script type="text/javascript">
+
+ var mathml = "http://www.w3.org/1998/Math/MathML";
+
+ function createMo(aOperator, aForm)
+ {
+ var mo = document.createElementNS(mathml, "mo");
+ mo.appendChild(document.createTextNode(aOperator));
+ mo.setAttribute("form", aForm);
+ return mo;
+ }
+
+ function createTest(aEntry)
+ {
+ var opname = aEntry[0];
+ var operator = aEntry[1];
+ var type = aEntry[2];
+ var form = aEntry[3];
+
+ var div = document.createElement("div");
+ div.appendChild(document.createTextNode(opname));
+
+ var math = document.createElementNS(mathml, "math");
+
+ switch (type)
+ {
+ case "l": // largeop
+ math.appendChild(createMo(operator, form));
+ var mstyle = document.createElementNS(mathml, "mstyle");
+ mstyle.setAttribute("displaystyle", "true");
+ mstyle.appendChild(createMo(operator, form));
+ math.appendChild(mstyle);
+ break;
+
+ case "v": // vertical
+ for (var i = 1; i < 10; i+=2) {
+ var mo = createMo(operator, form);
+ mo.setAttribute("minsize", (.5 * i) + "em");
+ math.appendChild(mo);
+ }
+ break;
+
+ case "h": // horizontal
+ for (var i = 1; i < 10; i+=2) {
+ var mo = createMo(operator, form);
+ var mspace = document.createElementNS(mathml, "mspace");
+ mspace.setAttribute("width", (.5 * i) + "em");
+ var mover = document.createElementNS(mathml, "mover");
+ mover.setAttribute("accent", "false");
+ mover.appendChild(mspace);
+ mover.appendChild(mo);
+ math.appendChild(mover);
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ div.appendChild(math);
+ document.body.appendChild(div);
+ }
+
+ function init()
+ {
+ for (var i in stretchy_and_large_operators) {
+ createTest(stretchy_and_large_operators[i]);
+ }
+ }
+ </script>
+ </head>
+
+ <body onload="init()">
+
+ </body>
+</html>