| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src='../../resources/testharness.js'></script> |
| 3 <script src='../../resources/testharnessreport.js'></script> |
| 4 <body> |
| 5 <iframe></iframe> |
| 6 </body> |
| 7 <script> |
| 8 'use strict'; |
| 9 |
| 10 let iframe = document.querySelector('iframe'); |
| 11 let iframeDoc = iframe.contentDocument; |
| 12 |
| 13 let focusableIframe = document.createElement('iframe'); |
| 14 iframeDoc.body.appendChild(focusableIframe); |
| 15 |
| 16 focusableIframe.contentWindow.addEventListener('unload', () => { |
| 17 // Try to focus on frame owner during unload event of its content. |
| 18 focusableIframe.focus(); |
| 19 }); |
| 20 |
| 21 test(() => { |
| 22 // Trigger unload event. |
| 23 document.body.appendChild(focusableIframe); |
| 24 |
| 25 var input = document.createElement('input'); |
| 26 iframeDoc.body.appendChild(input); |
| 27 input.focus(); |
| 28 assert_true(true, 'This test must run without crash.'); |
| 29 }, 'Should not trigger assertion. crbug.com/677690'); |
| 30 </script> |
| OLD | NEW |