dom/tests/mochitest/general/test_497898.html

branch
TOR_BUG_9701
changeset 8
97036ab72558
equal deleted inserted replaced
-1:000000000000 0:8ffb5d0948e1
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 type="text/javascript" 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(function () window.open('497633.html', '_new', 'width=300,height=300'), 0);
18 }
19 </script>
20 </head>
21 <body>
22 <iframe src="data:text/html;charset=utf-8,%3Chtml%3E%0A%3Chead%3E%3C/head%3E%0A%3Cbody%3E%0A%3Cbutton%20id%3D%22a%22%20onfocus%3D%22parent.switchFocus%28%29%22%20onblur%3D%22window.frameElement.parentNode.removeChild%28window.frameElement%29%22%3ESwitching%20focus%20to%20a%20different%20program%20should%20not%20crash%20Mozilla%3C/button%3E%0A%3Cscript%3E%0Adocument.getElementById%28%27a%27%29.focus%28%29%3B%0A%3C/script%3E%0A%3C/body%3E%0A%3C/html%3E"></iframe>
23
24 <p id="display"></p>
25 <div id="content" style="display: none"></div>
26
27 </body>
28 </html>
29

mercurial