dom/tests/mochitest/general/test_497898.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/tests/mochitest/general/test_497898.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,29 @@
     1.4 +<html>
     1.5 +<head>
     1.6 +<title>Crash [@ nsFocusManager::SendFocusOrBlurEvent] after switching focus to a different window in this case</title>
     1.7 +<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
     1.8 +<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
     1.9 +<script>
    1.10 +SimpleTest.waitForExplicitFinish();
    1.11 +
    1.12 +function done()
    1.13 +{
    1.14 +  is("passed", "passed", "test passed without crashing");
    1.15 +  SimpleTest.finish();
    1.16 +}
    1.17 +
    1.18 +function switchFocus()
    1.19 +{
    1.20 +  setTimeout(function () window.open('497633.html', '_new', 'width=300,height=300'), 0);
    1.21 +}
    1.22 +</script>
    1.23 +</head>
    1.24 +<body>
    1.25 +<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>
    1.26 +
    1.27 +<p id="display"></p>
    1.28 +<div id="content" style="display: none"></div>
    1.29 +
    1.30 +</body>
    1.31 +</html>
    1.32 +

mercurial