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.
1 <html>
2 <body>
3 <script>
5 // Because this file is inside <iframe mozbrowser>, the alert() calls below
6 // don't trigger actual dialogs. Instead, the document which contans the
7 // iframe receives mozbrowsershowmodalprompt events, which the document uses
8 // to determine test success/failure.
10 function is(x, y, reason) {
11 if (x === y) {
12 alert("success: " + x + " === " + y + ", " + reason);
13 }
14 else {
15 alert("failure: " + x + " !== " + y + ", " + reason);
16 }
17 }
19 function ok(bool, reason) {
20 alert((bool ? "success: " : "failure: ") + reason);
21 }
23 // Send "dialog=1" as a test for bug 783644. It shouldn't have any effect.
24 var w = window.open("file_browserElement_Open2.html", "name", "dialog=1");
25 w.addEventListener("load", function() {
26 ok(true, "got load");
27 is(w.opener, window, 'opener property');
28 is(w.location.href, location.href.replace('Open1', 'Open2'), 'correct location');
29 is(w.document.getElementById('testElem').innerHTML, 'test', 'elem innerHTML');
30 alert("finish");
31 });
32 </script>
33 </body>
34 </html>