e7c260a01075736b92f6162e452b9ca334c4a00c
[WebKit-https.git] / LayoutTests / platform / ios-simulator / accessibility / math.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../../../resources/js-test-pre.js"></script>
5 <script>
6 var successfullyParsed = false;
7 if (window.testRunner)
8   testRunner.dumpAsText();
9 </script>
10 </head>
11 <body>
12
13 <div class="contents" id="group" tabindex="0">
14       Raman scattering study of the  
15       <span role="math" aria-label=" F e sub 1  minus x, end subscript. C o sub x, S b sub 2">
16         <math alttext=" F e sub 1  minus x, end subscript. C o sub x, S b sub 2" aria-hidden="true">
17           <mrow>
18             <msub>
19               <mrow>
20                 <mtext>Fe</mtext>
21               </mrow>
22               <mrow>
23                 <mn>1</mn>
24                 <mo>&#x2212;</mo>
25                 <mi>x</mi>
26               </mrow>
27             </msub>
28             <msub>
29               <mrow>
30                 <mtext>Co</mtext>
31               </mrow>
32               <mi>x</mi>
33             </msub>
34             <msub>
35               <mrow>
36                 <mtext>Sb</mtext>
37               </mrow>
38               <mn>2</mn>
39             </msub>
40           </mrow>
41         </math>
42       </span>
43       and 
44       <span role="math" aria-label="  open, 0  less than or equal to x  less than or equal to 1,  close">
45         <math role="presentation" alttext="  open, 0  less than or equal to x  less than or equal to 1,  close" aria-hidden="true">
46           <mrow>
47             <mrow>
48               <mo>(</mo>
49               <mrow>
50                 <mn>0</mn>
51                 <mo>&#x2264;</mo>
52                 <mi>x</mi>
53                 <mo>&#x2264;</mo>
54                 <mn>1</mn>
55               </mrow>
56               <mo>)</mo>
57             </mrow>
58           </mrow>
59         </math>
60       </span>
61       single crystals.
62     </div>
63   
64
65 <p id="description"></p>
66 <div id="console"></div>
67
68 <script>
69
70    description("This test the math role type will be an accessibility element.");
71
72    if (window.accessibilityController) {
73
74        document.getElementById("group").focus();
75        var group = accessibilityController.focusedElement;
76        shouldBe("group.childrenCount", "5");
77        shouldBe("group.childAtIndex(0).description", "'AXLabel: Raman scattering study of the'");
78        shouldBe("group.childAtIndex(1).description", "'AXLabel:  F e sub 1  minus x, end subscript. C o sub x, S b sub 2, math'");
79        shouldBe("group.childAtIndex(2).description", "'AXLabel: and'");
80        shouldBe("group.childAtIndex(3).description", "'AXLabel:   open, 0  less than or equal to x  less than or equal to 1,  close, math'");
81        shouldBe("group.childAtIndex(4).description", "'AXLabel: single crystals.'");
82
83        shouldBeFalse("group.childAtIndex(0).isIgnored");
84        shouldBeFalse("group.childAtIndex(1).isIgnored");
85        shouldBeFalse("group.childAtIndex(2).isIgnored");
86        shouldBeFalse("group.childAtIndex(3).isIgnored");
87        shouldBeFalse("group.childAtIndex(4).isIgnored");
88    }
89
90    successfullyParsed = true;
91 </script>
92
93 <script src="../../../resources/js-test-post.js"></script>
94
95 </body>
96 </html>