| <!DOCTYPE html><!-- webkit-test-runner [ KeygenElementEnabled=true ] --> |
| <html> |
| <head> |
| <script src="../../resources/js-test-pre.js"></script> |
| <script> |
| window.jsTestIsAsync = true; |
| |
| function onLoad() { |
| requestAnimationFrame(() => { |
| shouldBe('document.activeElement', 'document.querySelector("keygen")'); |
| shouldBe('document.activeElement.autofocus', 'true'); |
| finishJSTest(); |
| }); |
| } |
| </script> |
| </head> |
| <body onload="onLoad();"> |
| <keygen autofocus> |
| <pre id="console"> |
| This tests whether the keygen element supports the autofocus attribute. |
| |
| </pre> |
| <script src="../../resources/js-test-post.js"></script> |
| </body> |
| </html> |