| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE HTML> |
| 2 <script src="../../resources/testharness.js"></script> |
| 3 <script src="../../resources/testharnessreport.js"></script> |
| 4 <body></body> |
| 5 <script> |
| 6 // Test case for crbug.com/627074 |
| 7 test(() => { |
| 8 var iframe = document.createElement('iframe'); |
| 9 document.body.appendChild(iframe); |
| 10 |
| 11 var doc = iframe.contentDocument; |
| 12 var focusableIframe = document.createElement('iframe'); |
| 13 focusableIframe.id = 'iframe1'; |
| 14 doc.body.appendChild(focusableIframe); |
| 15 focusableIframe.contentWindow.addEventListener('unload', function () { |
| 16 focusableIframe.focus(); |
| 17 }); |
| 18 document.body.appendChild(focusableIframe); |
| 19 |
| 20 focusableIframe = document.createElement('iframe'); |
| 21 focusableIframe.id = 'iframe2'; |
| 22 doc.body.appendChild(focusableIframe); |
| 23 |
| 24 focusableIframe.focus(); |
| 25 }, 'focus should not crash even when it involves updateLayout.'); |
| 26 </script> |
| OLD | NEW |