0af55814f700632476609b7303487b01cb73cf29
[WebKit-https.git] / LayoutTests / platform / ios-simulator / accessibility / aria-pressed-state.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 id="button1" tabindex=0 role="button" aria-pressed="true">button 1</div>
14 <div id="button2" tabindex=0 role="button" aria-pressed="false">button 2</div>
15
16
17 <p id="description"></p>
18 <div id="console"></div>
19
20 <script>
21
22     description("This test thats aria-pressed changes the traits returned by buttons");
23
24     if (window.accessibilityController) {
25
26         document.getElementById("button1").focus();
27         var btn1 = accessibilityController.focusedElement;
28
29         document.getElementById("button2").focus();
30         var btn2 = accessibilityController.focusedElement;
31  
32         shouldBe("btn1.iphoneTraits != btn2.iphoneTraits", "true");
33     }
34
35     successfullyParsed = true;
36 </script>
37
38 <script src="../../../resources/js-test-post.js"></script>
39
40 </body>
41 </html>
42