| <script src="../../resources/js-test-pre.js"></script> |
| <title>Search Field Cancel Button</title> |
| <input id="search" type="search" value="X"> |
| description("This tests that the search field cancel button is exposed correctly."); |
| if (window.accessibilityController) { |
| var button = accessibilityController.accessibleElementById("search").childAtIndex(1); |
| shouldBe("button.description", "'AXDescription: cancel'"); |
| shouldBe("button.role", "'AXRole: AXButton'"); |
| shouldBe("button.roleDescription", "'AXRoleDescription: button'"); |
| // Search field has value before press. |
| shouldBe("document.getElementById('search').value", "'X'"); |
| // Search field has no value after press. |
| shouldBe("document.getElementById('search').value", "''"); |
| <script src="../../resources/js-test-post.js"></script> |