| OLD | NEW |
| 1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
| 2 <script src="../../../resources/testharness.js"></script> | 2 <script src="../../resources/testharness.js"></script> |
| 3 <script src="../../../resources/testharnessreport.js"></script> | 3 <script src="../../resources/testharnessreport.js"></script> |
| 4 <button id="button"></button> | 4 <button id="button"></button> |
| 5 <iframe id="iframe"></iframe> | 5 <iframe id="iframe"></iframe> |
| 6 <script> | 6 <script> |
| 7 // This is a crash reproduction case for crbug.com/626750. | 7 // This is a crash reproduction case for crbug.com/626750. |
| 8 | 8 |
| 9 // Things are expected to happen in this order: | 9 // Things are expected to happen in this order: |
| 10 // 1. window.onload event fires | 10 // 1. window.onload event fires |
| 11 // 2. button.focus() | 11 // 2. button.focus() |
| 12 // 3. button's focus event handler is called | 12 // 3. button's focus event handler is called |
| 13 // 4. iframe.contentWindow.focus() | 13 // 4. iframe.contentWindow.focus() |
| (...skipping 11 matching lines...) Expand all Loading... |
| 25 })); | 25 })); |
| 26 | 26 |
| 27 button.addEventListener('blur', test.step_func(() => { | 27 button.addEventListener('blur', test.step_func(() => { |
| 28 // This detaches <iframe>. | 28 // This detaches <iframe>. |
| 29 document.open(); | 29 document.open(); |
| 30 })); | 30 })); |
| 31 | 31 |
| 32 window.addEventListener('load', () => button.focus()); | 32 window.addEventListener('load', () => button.focus()); |
| 33 }, 'focusing on detached frame should not crash'); | 33 }, 'focusing on detached frame should not crash'); |
| 34 </script> | 34 </script> |
| OLD | NEW |