mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 661991 - tests. r=bbondy, a=ehsan
This commit is contained in:
parent
7e8f0530a3
commit
01435a82d4
@ -124,6 +124,8 @@ _CHROME_FILES += taskbar_previews.xul \
|
||||
$(NULL)
|
||||
|
||||
_TEST_FILES += test_bug565392.html \
|
||||
test_picker_no_crash.html \
|
||||
window_picker_no_crash_child.html \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
|
35
widget/tests/test_picker_no_crash.html
Normal file
35
widget/tests/test_picker_no_crash.html
Normal file
@ -0,0 +1,35 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test for crashes when the parent window of a file picker is closed via script</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
</head>
|
||||
|
||||
<script type="application/javascript">
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
var childWindow;
|
||||
|
||||
function testStepOne() {
|
||||
childWindow = window.open('window_picker_no_crash_child.html', 'childWindow', 'width=300,height=150');
|
||||
SimpleTest.waitForFocus(testStepTwo, childWindow);
|
||||
}
|
||||
|
||||
function testStepTwo() {
|
||||
childWindow.document.form1.uploadbox.click();
|
||||
// This should not crash the browser
|
||||
childWindow.close();
|
||||
setTimeout("testStepThree();", 5000);
|
||||
}
|
||||
|
||||
function testStepThree() {
|
||||
ok(true, "browser didn't crash");
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
SimpleTest.waitForFocus(testStepOne);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
10
widget/tests/window_picker_no_crash_child.html
Normal file
10
widget/tests/window_picker_no_crash_child.html
Normal file
@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Picker window</title>
|
||||
</head>
|
||||
<body>
|
||||
<form name="form1">
|
||||
<input type="file" name="uploadbox">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user