Refactoring: Pull all fullscreen code out of Document and into its own helper class
[WebKit-https.git] / LayoutTests / accessibility / auto-fill-crash.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <script src="../resources/js-test-pre.js"></script>
6 </head>
7 <body id="body">
8
9 <input type="text" value="hello" id="textfield">
10
11 <p id="description"></p>
12 <div id="console"></div>
13
14 <script>
15
16     description("This tests that when an auto fill element is removed we won't crash accessing an old value.");
17
18     if (window.accessibilityController) {
19         var axTextField = accessibilityController.accessibleElementById("textfield");
20         var childrenCountExpected = accessibilityController.platformName == "atk" ? "2" : "3";
21         window.internals.setShowAutoFillButton(document.getElementById("textfield"), "Contacts");
22         shouldBe("accessibilityController.accessibleElementById('textfield').childrenCount", childrenCountExpected);
23
24         // Don't crash!
25         childrenCountExpected = accessibilityController.platformName == "atk" ? "0" : "1";
26         window.internals.setShowAutoFillButton(document.getElementById("textfield"), "None");
27         shouldBe("accessibilityController.accessibleElementById('textfield').childrenCount", childrenCountExpected);
28     }
29
30 </script>
31
32 <script src="../resources/js-test-post.js"></script>
33 </body>
34 </html>