Update device orientation & motion permission native SPI as per latest proposal
[WebKit-https.git] / LayoutTests / accessibility / menu-list-crash2.html
1 <html>
2 <head>
3 <script src="../resources/js-test-pre.js"></script>
4 </head>
5 <body>
6
7 TEST
8 <div id="content">
9
10 <select id="menulist">
11   <option selected>One</option>
12   <option>Two</option>
13   <option>Three</option>
14 </select>
15
16 </div>
17 TEST
18
19 <p id="description"></p>
20 <div id="console"></div>
21
22 <script>
23
24 function runTest() {
25     description("This tests that there's no crash if we hide menu list and then try to access accessibility information.");
26
27     if (window.accessibilityController) {
28         var menulist = document.getElementById("menulist");
29         menulist.focus();
30         menulist.selectedIndex = 1;
31
32         var accessibleMenulist = accessibilityController.focusedElement;
33         debug("Role before removal: " + accessibleMenulist.role);
34
35         menulist.style.display = "none";
36         gc();
37
38         // Don't crash!
39         debug("Role after removal: " + accessibleMenulist.role);
40     }
41 }
42
43 runTest();
44 </script>
45
46 </body>
47 <script src="../resources/js-test-post.js"></script>
48 </html>