| <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| <html> |
| <head> |
| <script src="../resources/js-test.js"></script> |
| <script src="../resources/accessibility-helper.js"></script> |
| </head> |
| <body> |
| |
| <input type="search" value="hello" id="searchInput"> |
| |
| <script> |
| if (window.accessibilityController) { |
| window.jsTestIsAsync = true; |
| let output = "This tests that a search field returns its value correctly.\n"; |
| |
| var searchInput = accessibilityController.accessibleElementById("searchInput"); |
| output += expect("searchInput.stringValue", "'AXValue: hello'"); |
| |
| document.getElementById("searchInput").value = "test"; |
| setTimeout(async function() { |
| await waitFor(() => { return searchInput.stringValue == "AXValue: test"; }); |
| output += expect("searchInput.stringValue", "'AXValue: test'"); |
| |
| debug(output); |
| finishJSTest(); |
| }, 0); |
| } |
| </script> |
| </body> |
| </html> |