File tree 2 files changed +31
-0
lines changed
2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,20 @@ var tests = [
76
76
]
77
77
} ,
78
78
79
+ '<em>The next test checks if the browser makes any effort at rendering MathML, it does not stress test MathML support</em>' ,
80
+ /* We might want to expand the test to check for support of specific elements though, at least Content vs Presentation markup */
81
+
82
+ {
83
+ id : 'mathml' ,
84
+ name : 'MathML support' ,
85
+ value : 2 /* 1 for Content, 1 for Presentation */ ,
86
+ urls : [
87
+ [ 'w3c' , 'https://www.w3.org/TR/MathML/' ] ,
88
+ [ 'mdn' , '/Web/MathML' ]
89
+ ]
90
+ } ,
91
+
92
+
79
93
'<strong>New or modified elements</strong>' ,
80
94
81
95
{
Original file line number Diff line number Diff line change @@ -211,6 +211,23 @@ Test9 = (function () {
211
211
} ) ;
212
212
} ,
213
213
214
+ /* mathml support */
215
+
216
+ function ( results ) {
217
+ var element = document . createElement ( 'div' ) ;
218
+ element . innerHTML = "<math><mspace height='23px' width='77px'/></math>" ;
219
+ document . body . appendChild ( element ) ;
220
+ var box = element . firstChild . firstChild . getBoundingClientRect ( ) ;
221
+ console . log ( box ) ;
222
+
223
+ results . addItem ( {
224
+ key : 'elements.mathml' ,
225
+ passed : box . height == 23 && box . width == 77
226
+ } ) ;
227
+
228
+ document . body . removeChild ( element ) ;
229
+ } ,
230
+
214
231
215
232
/* section, nav, article, header and footer */
216
233
You can’t perform that action at this time.
0 commit comments