summaryrefslogtreecommitdiffstats
path: root/dom/base/test/test_dialogArguments.html
blob: 70a091d0005eed67e7612e7ff270a93321d734ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<!DOCTYPE html>
<html>
<head>
	<title>Test for Bug 1019761</title>
	<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
	<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>

	<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body>
<script type="application/javascript">

/*
	Tests whether Firefox crashes when accessing the dialogArguments property
	of a modal window that has been closed.
*/
SimpleTest.waitForExplicitFinish();

function openModal() {
	showModalDialog("javascript:opener.winRef = window; \
		window.opener.setTimeout(\'winRef.dialogArguments;\', 0);\
		window.close();");

	ok(true, "dialogArguments did not cause a crash.");
	SimpleTest.finish();
}

window.onload = openModal;
</script>
</body>
</html>