| OLD | NEW |
| 1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
| 2 <html> | 2 <html> |
| 3 <body> | 3 <body> |
| 4 <script src="../../resources/js-test.js"></script> | 4 <script src="../../resources/js-test.js"></script> |
| 5 | 5 <div id="container"> |
| 6 <div> | 6 <div> |
| 7 <a id="link1" href="#">Link</a> | 7 <a id="link1" href="#">Link</a> |
| 8 <button id="button1">Button</button> | 8 <button id="button1">Button</button> |
| 9 <input id="text1" type="text"> | 9 <input id="text1" type="text"> |
| 10 <input id="checkbox1" type="checkbox"> | 10 <input id="checkbox1" type="checkbox"> |
| 11 <input id="radio1" type="radio"> | 11 <input id="radio1" type="radio"> |
| 12 <input id="slider1" type="range"> | 12 <input id="slider1" type="range"> |
| 13 <input id="submit1" type="submit"> | 13 <input id="submit1" type="submit"> |
| 14 <select id="combobox1"><option>1<option>2</select> | 14 <select id="combobox1"><option>1<option>2</select> |
| 15 <select id="listbox1" multiple><option>1<option>2</select> | 15 <select id="listbox1" multiple><option>1<option>2</select> |
| (...skipping 11 matching lines...) Expand all Loading... |
| 27 <input id="submit2" type="submit"> | 27 <input id="submit2" type="submit"> |
| 28 <select id="combobox2"><option>1<option>2</select> | 28 <select id="combobox2"><option>1<option>2</select> |
| 29 <select id="listbox2" multiple><option>1<option>2</select> | 29 <select id="listbox2" multiple><option>1<option>2</select> |
| 30 <textarea id="textarea2"></textarea> | 30 <textarea id="textarea2"></textarea> |
| 31 <div id="focusable2" tabindex="0">Focusable</div> | 31 <div id="focusable2" tabindex="0">Focusable</div> |
| 32 </canvas> | 32 </canvas> |
| 33 | 33 |
| 34 <canvas hidden id="hiddenCanvas" width="300" height="300"> | 34 <canvas hidden id="hiddenCanvas" width="300" height="300"> |
| 35 <a id="linkInHiddenCanvas" href="#">Link</a> | 35 <a id="linkInHiddenCanvas" href="#">Link</a> |
| 36 </canvas> | 36 </canvas> |
| 37 | 37 </div> |
| 38 <div id="console"></div> | 38 <div id="console"></div> |
| 39 <script> | 39 <script> |
| 40 description("This test makes sure that focusable elements in canvas fallback con
tent are focusable."); | 40 description("This test makes sure that focusable elements in canvas fallback con
tent are focusable."); |
| 41 | 41 |
| 42 if (window.testRunner) | 42 if (window.testRunner) |
| 43 window.testRunner.dumpAsText(); | 43 window.testRunner.dumpAsText(); |
| 44 | 44 |
| 45 var element; | 45 var element; |
| 46 function checkFocusable(id) { | 46 function checkFocusable(id) { |
| 47 debug(id + " should be focusable."); | 47 debug(id + " should be focusable."); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 debug(id + " should not be focusable."); | 80 debug(id + " should not be focusable."); |
| 81 previousFocusedElement = document.activeElement; | 81 previousFocusedElement = document.activeElement; |
| 82 element = document.getElementById(id); | 82 element = document.getElementById(id); |
| 83 element.focus(); | 83 element.focus(); |
| 84 shouldBe("document.activeElement == previousFocusedElement", "true"); | 84 shouldBe("document.activeElement == previousFocusedElement", "true"); |
| 85 debug(""); | 85 debug(""); |
| 86 } | 86 } |
| 87 | 87 |
| 88 checkNotFocusable("linkInHiddenCanvas"); | 88 checkNotFocusable("linkInHiddenCanvas"); |
| 89 | 89 |
| 90 document.querySelector("#container").remove(); |
| 90 </script> | 91 </script> |
| 91 | 92 |
| 92 </body> | 93 </body> |
| 93 </html> | 94 </html> |
| OLD | NEW |