Skip to content

Commit 6eb0583

Browse files
committed
Add more tests to check mrow fallback for invalid mmultiscripts
See w3c/mathml-core#61 (comment)
1 parent 584cd49 commit 6eb0583

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

mathml/presentation-markup/mrow/mrow-fallback.html

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,63 @@
6363
}
6464
}
6565
});
66+
Array.from(document.getElementById("invalidMultiscripts").
67+
getElementsByTagName("mmultiscripts")).forEach(element => {
68+
let reference = element.nextElementSibling;
69+
let description = element.dataset.description;
70+
test(function() {
71+
compareLayout(element, reference, epsilon);
72+
}, `Invalid mmultiscripts should lay out as an mrow (${description})`);
73+
});
74+
6675
done();
6776
}
6877
</script>
6978
</head>
7079
<body>
7180
<div id="log"></div>
7281
<div id="container"></div>
82+
<div id="invalidMultiscripts">
83+
<math>
84+
<mmultiscripts data-description="first in-flow child is an <mprescripts>">
85+
<mprescripts/>
86+
<mspace height="5px" depth="15px" width="10px" style="background: black"/>
87+
<mspace height="30px" depth="10px" width="20px" style="background: black"/>
88+
<mspace height="15px" depth="45px" width="30px" style="background: black"/>
89+
<mspace height="60px" depth="20px" width="40px" style="background: black"/>
90+
91+
</mmultiscripts>
92+
<mrow>
93+
<mprescripts/>
94+
<mspace height="5px" depth="15px" width="10px" style="background: black"/>
95+
<mspace height="30px" depth="10px" width="20px" style="background: black"/>
96+
<mspace height="15px" depth="45px" width="30px" style="background: black"/>
97+
<mspace height="60px" depth="20px" width="40px" style="background: black"/>
98+
99+
</mrow>
100+
</math>
101+
<math>
102+
<mmultiscripts data-description="one of the even number of children after the first <mprescripts> is an <mprescripts>">
103+
<mspace height="5px" depth="15px" width="10px" style="background: black"/>
104+
<mspace height="30px" depth="10px" width="20px" style="background: black"/>
105+
<mspace height="15px" depth="45px" width="30px" style="background: black"/>
106+
<mprescripts/>
107+
<mspace height="60px" depth="20px" width="40px" style="background: black"/>
108+
<mprescripts/>
109+
<mspace height="25px" depth="75px" width="50px" style="background: black"/>
110+
<mspace height="35px" depth="105px" width="70px" style="background: black"/>
111+
</mmultiscripts>
112+
<mrow>
113+
<mspace height="5px" depth="15px" width="10px" style="background: black"/>
114+
<mspace height="30px" depth="10px" width="20px" style="background: black"/>
115+
<mspace height="15px" depth="45px" width="30px" style="background: black"/>
116+
<mprescripts/>
117+
<mspace height="60px" depth="20px" width="40px" style="background: black"/>
118+
<mprescripts/>
119+
<mspace height="25px" depth="75px" width="50px" style="background: black"/>
120+
<mspace height="35px" depth="105px" width="70px" style="background: black"/>
121+
</mrow>
122+
</math>
123+
</div>
73124
</body>
74125
</html>

0 commit comments

Comments
 (0)