dom/tests/mochitest/bugs/test_bug414291.html

branch
TOR_BUG_9701
changeset 8
97036ab72558
equal deleted inserted replaced
-1:000000000000 0:778800ccf1cc
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=414291
5 -->
6 <head>
7 <title>Test for Bug 414291</title>
8 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
10 </head>
11 <body>
12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=414291">Mozilla Bug 414291</a>
13 <script class="testbody" type="text/javascript">
14
15 /** Test for Bug 414291 **/
16
17 var result1 = 0;
18 var result2 = 0;
19 var result3 = 0;
20
21 window.open("data:text/html,<html><body onload='close(); opener.result1 = 1;'>", "w1");
22 is(result1, 0, "window either opened as modal or loaded synchronously.");
23
24 window.open("data:text/html,<html><body onload='close(); opener.result2 = 2;'>", "w2", "modal=yes");
25 is(result2, 0, "window either opened as modal or data loaded synchronously.");
26
27 result3 = window.showModalDialog("data:text/html,<html><body onload='close(); returnValue = 3;'>");
28 is(result3, 3, "window didn't open as modal.");
29
30 </script>
31 </pre>
32 </body>
33 </html>

mercurial