| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../../../resources/js-test.js"></script> | 4 <script src="../../../resources/js-test.js"></script> |
| 5 <script src="../../forms/resources/common.js"></script> | 5 <script src="../../forms/resources/common.js"></script> |
| 6 <script> | 6 <script> |
| 7 description('Tests autofocus when a modal dialog is opened.'); | 7 description('Tests autofocus when a modal dialog is opened.'); |
| 8 | 8 |
| 9 function test() { | 9 function test() { |
| 10 shouldBe('document.activeElement', 'document.getElementById("outer-button")'
); | 10 shouldBe('document.activeElement', 'document.getElementById("outer-button")'
); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 } | 44 } |
| 45 | 45 |
| 46 jsTestIsAsync = true; | 46 jsTestIsAsync = true; |
| 47 waitUntilLoadedAndAutofocused(test); | 47 waitUntilLoadedAndAutofocused(test); |
| 48 </script> | 48 </script> |
| 49 </head> | 49 </head> |
| 50 <body> | 50 <body> |
| 51 <button id="outer-button" autofocus></button> | 51 <button id="outer-button" autofocus></button> |
| 52 <dialog id="dialog"> | 52 <dialog id="dialog"> |
| 53 <button></button> | 53 <button></button> |
| 54 <!-- Unfocusable elements with [autofocus] should be ignored. --> |
| 55 <input autofocus disabled> |
| 56 <textarea autofocus hidden></textarea> |
| 54 <dialog> | 57 <dialog> |
| 55 <button autofocus></button> | 58 <button autofocus></button> |
| 56 </dialog> | 59 </dialog> |
| 57 <div> | 60 <div> |
| 58 <span> | 61 <span> |
| 59 <button id="autofocus-button" autofocus></button> | 62 <button id="autofocus-button" autofocus></button> |
| 60 </span> | 63 </span> |
| 61 </div> | 64 </div> |
| 62 <button id="another-button" autofocus></button> | 65 <button id="another-button" autofocus></button> |
| 63 </dialog> | 66 </dialog> |
| 64 </body> | 67 </body> |
| 65 </html> | 68 </html> |
| OLD | NEW |