dom/tests/mochitest/general/test_497898.html

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

michael@0 1 <html>
michael@0 2 <head>
michael@0 3 <title>Crash [@ nsFocusManager::SendFocusOrBlurEvent] after switching focus to a different window in this case</title>
michael@0 4 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
michael@0 5 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
michael@0 6 <script>
michael@0 7 SimpleTest.waitForExplicitFinish();
michael@0 8
michael@0 9 function done()
michael@0 10 {
michael@0 11 is("passed", "passed", "test passed without crashing");
michael@0 12 SimpleTest.finish();
michael@0 13 }
michael@0 14
michael@0 15 function switchFocus()
michael@0 16 {
michael@0 17 setTimeout(function () window.open('497633.html', '_new', 'width=300,height=300'), 0);
michael@0 18 }
michael@0 19 </script>
michael@0 20 </head>
michael@0 21 <body>
michael@0 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>
michael@0 23
michael@0 24 <p id="display"></p>
michael@0 25 <div id="content" style="display: none"></div>
michael@0 26
michael@0 27 </body>
michael@0 28 </html>
michael@0 29

mercurial