gecko-dev/widget/tests/test_picker_no_crash.html

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

37 строки
953 B
HTML
Исходник Обычный вид История

2011-12-15 01:22:53 +04:00
<!DOCTYPE HTML>
<html>
<head>
<title>Test for crashes when the parent window of a file picker is closed via script</title>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
2011-12-15 01:22:53 +04:00
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<script type="application/javascript">
SimpleTest.waitForExplicitFinish();
SimpleTest.requestFlakyTimeout("untriaged");
2011-12-15 01:22:53 +04:00
var childWindow;
function testStepOne() {
childWindow = window.browsingContext.topChromeWindow.open("window_picker_no_crash_child.html", "childWindow", "width=300,height=150");
2011-12-15 01:22:53 +04:00
SimpleTest.waitForFocus(testStepTwo, childWindow);
}
function testStepTwo() {
childWindow.document.form1.uploadbox.click();
// This should not crash the browser
childWindow.close();
setTimeout(testStepThree, 5000);
2011-12-15 01:22:53 +04:00
}
function testStepThree() {
ok(true, "browser didn't crash");
SimpleTest.finish();
}
SimpleTest.waitForFocus(testStepOne);
</script>
</body>
</html>