Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | <!DOCTYPE HTML> |
michael@0 | 2 | <html> |
michael@0 | 3 | <head> |
michael@0 | 4 | <title>Test for crashes when the parent window of a file picker is closed via script</title> |
michael@0 | 5 | <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
michael@0 | 6 | <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> |
michael@0 | 7 | </head> |
michael@0 | 8 | |
michael@0 | 9 | <script type="application/javascript"> |
michael@0 | 10 | |
michael@0 | 11 | SimpleTest.waitForExplicitFinish(); |
michael@0 | 12 | |
michael@0 | 13 | var childWindow; |
michael@0 | 14 | |
michael@0 | 15 | function testStepOne() { |
michael@0 | 16 | childWindow = window.open('window_picker_no_crash_child.html', 'childWindow', 'width=300,height=150'); |
michael@0 | 17 | SimpleTest.waitForFocus(testStepTwo, childWindow); |
michael@0 | 18 | } |
michael@0 | 19 | |
michael@0 | 20 | function testStepTwo() { |
michael@0 | 21 | childWindow.document.form1.uploadbox.click(); |
michael@0 | 22 | // This should not crash the browser |
michael@0 | 23 | childWindow.close(); |
michael@0 | 24 | setTimeout("testStepThree();", 5000); |
michael@0 | 25 | } |
michael@0 | 26 | |
michael@0 | 27 | function testStepThree() { |
michael@0 | 28 | ok(true, "browser didn't crash"); |
michael@0 | 29 | SimpleTest.finish(); |
michael@0 | 30 | } |
michael@0 | 31 | |
michael@0 | 32 | SimpleTest.waitForFocus(testStepOne); |
michael@0 | 33 | </script> |
michael@0 | 34 | </body> |
michael@0 | 35 | </html> |