| <!-- webkit-test-runner [ textExtractionEnabled=true ] --> |
| <!DOCTYPE html> |
| <html> |
| <head> |
| <style> |
| body { |
| white-space: pre-wrap; |
| } |
| </style> |
| <script src="../../resources/ui-helper.js"></script> |
| </head> |
| <body> |
| <div>1. Password field<br><input type="password" value="first" /></div> |
| <div>2. Text field (previously a password field)<br><input id="originally-password-field" type="password" value="second" /></div> |
| <div>3. Password field (previously a text field)<br><input id="originally-text-field" value="third" /></div> |
| <div>4. Plain text field<br><input value="fourth" /></div> |
| <script> |
| addEventListener("load", async () => { |
| document.getElementById("originally-password-field").type = "text"; |
| document.getElementById("originally-text-field").type = "password"; |
| |
| if (!window.testRunner) |
| return; |
| |
| testRunner.waitUntilDone(); |
| testRunner.dumpAsText(); |
| document.body.textContent = await UIHelper.requestTextExtraction(); |
| testRunner.notifyDone(); |
| }); |
| </script> |
| </body> |
| </html> |