Refactoring: Pull all fullscreen code out of Document and into its own helper class
[WebKit-https.git] / LayoutTests / accessibility / heading-crash-after-hidden.html
1 <!DOCTYPE HTML>
2 <html>
3 <body>
4 <script src="../resources/js-test-pre.js"></script>
5
6 <h1 id="heading">X</h1>
7
8 <div id="console"></div>
9 <script>
10 if (window.testRunner && window.accessibilityController) {
11     description("This tests that we don't get a crash when trying to retrieve textual information for a heading after hiding it.");
12     var heading = document.getElementById("heading");
13     var axHeading = accessibilityController.rootElement.childAtIndex(0).childAtIndex(0);
14     debug(axHeading.title);
15     debug(axHeading.role);
16
17     // Hide the heading now.
18     heading.style.display = 'none';
19
20     // Forcing a retrieval of text associated to the object
21     // should not crash after hiding the heading.
22     axHeading.title;
23     axHeading.description;
24 }
25 </script>
26 <script src="../resources/js-test-post.js"></script>
27 </body>
28 </html>