| <!DOCTYPE html> |
| <html> |
| <body> |
| <p>This tests moving a focus across slotted input elements. |
| To test manually, press Tab key to move the focus from the first input element to the next.</p> |
| <div> |
| <div><input id="first"> <span></span></div> |
| <div><input id="second"></div> |
| </div> |
| <div id="result">FAIL</div> |
| <script> |
| |
| document.querySelector('span').attachShadow({mode: 'closed'}).innerHTML = ''; |
| |
| document.getElementById('first').focus(); |
| const resultElement = document.getElementById('result'); |
| const secondInputElement = document.getElementById('second'); |
| |
| if (window.eventSender) { |
| testRunner.dumpAsText(); |
| testRunner.waitUntilDone(); |
| |
| eventSender.keyDown('\t'); |
| setTimeout(() => { |
| resultElement.textContent = document.activeElement == secondInputElement ? 'PASS' : 'FAIL' |
| testRunner.notifyDone(); |
| }, 1); |
| } |
| |
| </script> |
| </body> |
| </html> |