diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /widget/tests/test_picker_no_crash.html | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'widget/tests/test_picker_no_crash.html')
-rw-r--r-- | widget/tests/test_picker_no_crash.html | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/widget/tests/test_picker_no_crash.html b/widget/tests/test_picker_no_crash.html new file mode 100644 index 000000000..08ba1db12 --- /dev/null +++ b/widget/tests/test_picker_no_crash.html @@ -0,0 +1,36 @@ +<!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(); +SimpleTest.requestFlakyTimeout("untriaged"); + +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> |