summaryrefslogtreecommitdiffstats
path: root/accessible/tests/mochitest/textattrs/test_mathml.html
blob: e6936ebc7f114991568d6ba3590ab09496f91d05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<html>

<head>
  <title>MathML Text attributes tests</title>
  <meta charset="utf-8">
  <link rel="stylesheet" href="chrome://mochikit/content/tests/SimpleTest/test.css" />

  <script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>

  <script src="../common.js"></script>
  <script src="../attributes.js"></script>
  <script src="../events.js"></script>

  <script>
    function doTest() {
      const math = getNode("math");
      const defAttrs = buildDefaultTextAttrs(math, "10pt");
      testDefaultTextAttrs(math, defAttrs);

      for (const id of ["mn", "mi", "annotation", "annotationXml"]) {
        testTextAttrs(id, 0, {}, defAttrs, 0, 1);
      }

      SimpleTest.finish();
    }

    SimpleTest.waitForExplicitFinish();
    addA11yLoadEvent(doTest);
  </script>
</head>
<body style="font-size: 12pt">

  <p id="display"></p>
  <div id="content" style="display: none"></div>
  <pre id="test">
  </pre>

  <math id="math" style="font-size: smaller">
    <mn id="mn">1</mn>
    <mi id="mi">x</mi>
    <!-- tabindex forces creation of an Accessible -->
    <annotation id="annotation" tabindex="0">a</annotation>
    <annotation-xml id="annotationXml" tabindex="0">a</annotation-xml>
  </math>

</body>
</html>