diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
commit | 43a97878ce14b72f0981164f87f2e35e14151312 (patch) | |
tree | 620249daf56c0258faa40cbdcf9cfba06de2a846 /widget/tests/test_picker_no_crash.html | |
parent | Initial commit. (diff) | |
download | firefox-43a97878ce14b72f0981164f87f2e35e14151312.tar.xz firefox-43a97878ce14b72f0981164f87f2e35e14151312.zip |
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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 0000000000..b23ca53def --- /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 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.browsingContext.topChromeWindow.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> |