test_497898.html (1120B)
1 <html> 2 <head> 3 <title>Crash [@ nsFocusManager::SendFocusOrBlurEvent] after switching focus to a different window in this case</title> 4 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"> 5 <script src="/tests/SimpleTest/SimpleTest.js"></script> 6 <script> 7 SimpleTest.waitForExplicitFinish(); 8 9 function done() 10 { 11 is("passed", "passed", "test passed without crashing"); 12 SimpleTest.finish(); 13 } 14 15 function switchFocus() 16 { 17 setTimeout(() => window.open('497633.html', '_new', 'width=300,height=300'), 0); 18 } 19 </script> 20 </head> 21 <body> 22 <iframe srcdoc="<html><meta charset='utf-8'> 23 <head> 24 <script> 25 function run() { 26 setTimeout(() => document.getElementById('a').focus(), 0); 27 } 28 </script> 29 </head> 30 <body onload='run()'> 31 <button id='a' onfocus='parent.switchFocus()' onblur='window.frameElement.parentNode.removeChild(window.frameElement)'>Switching focus to a different program should not crash Mozilla</button> 32 </body> 33 </html>"> 34 </iframe> 35 36 <p id="display"></p> 37 <div id="content" style="display: none"></div> 38 39 </body> 40 </html>