Update ANGLE
[WebKit-https.git] / LayoutTests / accessibility / mac / aria-required-popup-button.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../../resources/js-test-pre.js"></script>
5 </head>
6 <body id="body">
7
8 <div id="group">
9
10     <select id="s1" required>
11         <option>Foo</option>
12         <option>Bar</option>
13         <option>Baz</option>
14     </select><br><br>
15
16     <select id="s2" aria-required="true">
17         <option>Foo</option>
18         <option>Bar</option>
19         <option>Baz</option>
20     </select>
21
22     <select id="s3" aria-required="false">
23         <option>Foo</option>
24         <option>Bar</option>
25         <option>Baz</option>
26     </select>
27
28 </div>
29
30 <p id="description"></p>
31 <div id="console"></div>
32
33 <script>
34
35     description("This tests that AXRequired is reported for popup buttons.");
36
37     if (window.accessibilityController) {
38
39           debug("Verify required attribute works as expected.");
40           var button1 = accessibilityController.accessibleElementById("s1");
41           shouldBeTrue("button1.isAttributeSupported('AXRequired')");
42           shouldBeTrue("button1.boolAttributeValue('AXRequired')");
43
44           debug("Verify aria-required attribute works as expected.");
45           var button2 = accessibilityController.accessibleElementById("s2");
46           shouldBeTrue("button2.isAttributeSupported('AXRequired')");
47           shouldBeTrue("button2.boolAttributeValue('AXRequired')");
48
49           debug("Verify aria-required attribute works when it's false.");
50           var button3 = accessibilityController.accessibleElementById("s3");
51           shouldBeTrue("button3.isAttributeSupported('AXRequired')");
52           shouldBeFalse("button3.boolAttributeValue('AXRequired')");
53
54           document.getElementById("group").style.visibility = 'hidden';
55     }
56
57 </script>
58
59 <script src="../../resources/js-test-post.js"></script>
60 </body>
61 </html>