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