35 lines
1.2 KiB
HTML
35 lines
1.2 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<script src="../resources/js-test-pre.js"></script>
|
|
</head>
|
|
<body id="body">
|
|
|
|
<input type="text" value="hello" id="textfield">
|
|
|
|
<p id="description"></p>
|
|
<div id="console"></div>
|
|
|
|
<script>
|
|
|
|
description("This tests that when an auto fill element is removed we won't crash accessing an old value.");
|
|
|
|
if (window.accessibilityController) {
|
|
var axTextField = accessibilityController.accessibleElementById("textfield");
|
|
var childrenCountExpected = accessibilityController.platformName == "atk" ? "2" : "3";
|
|
window.internals.setShowAutoFillButton(document.getElementById("textfield"), "Contacts");
|
|
shouldBe("accessibilityController.accessibleElementById('textfield').childrenCount", childrenCountExpected);
|
|
|
|
// Don't crash!
|
|
childrenCountExpected = accessibilityController.platformName == "atk" ? "0" : "1";
|
|
window.internals.setShowAutoFillButton(document.getElementById("textfield"), "None");
|
|
shouldBe("accessibilityController.accessibleElementById('textfield').childrenCount", childrenCountExpected);
|
|
}
|
|
|
|
</script>
|
|
|
|
<script src="../resources/js-test-post.js"></script>
|
|
</body>
|
|
</html>
|