| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../../../fast/js/resources/js-test-pre.js"></script> | 4 <script src="../../../fast/js/resources/js-test-pre.js"></script> |
| 5 <script> | 5 <script> |
| 6 function runTest() { | 6 function runTest() { |
| 7 var target = document.getElementById('target'); | 7 var target = document.getElementById('target'); |
| 8 debug('Calling target.focus()'); | 8 debug('Calling target.focus()'); |
| 9 target.addEventListener('focus', function(e) { | 9 target.addEventListener('focus', function(e) { |
| 10 debug('focus received by ' + target); | 10 debug('focus received by ' + target); |
| 11 }); | 11 }); |
| 12 target.focus(); | 12 target.focus(); |
| 13 shouldBe('document.activeElement', 'target'); | 13 shouldBe('document.activeElement', 'target'); |
| 14 } | 14 } |
| 15 </script> | 15 </script> |
| 16 </head> | 16 </head> |
| 17 <body onload="runTest()"> | 17 <body onload="runTest()"> |
| 18 <label id="target" contenteditable>I'm editable.</label> | 18 <label id="target" contenteditable>I'm editable.</label> |
| 19 <button id="button">Just a button</button> | 19 <button id="button">Just a button</button> |
| 20 <script src="../../../fast/js/resources/js-test-post.js"> </script> | |
| 21 </body> | 20 </body> |
| 22 </html> | 21 </html> |
| 23 | 22 |
| OLD | NEW |