1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/xpconnect/tests/mochitest/file1_bug629227.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,32 @@ 1.4 +<!DOCTYPE html> 1.5 +<html> 1.6 + <head> 1.7 + <script> 1.8 + function doIt() { 1.9 + var doc = window.frames[0].document; 1.10 + var ok = (doc.form1 == doc.getElementById("test1")); 1.11 + window.parent.postMessage( 1.12 + JSON.stringify({ ok: ok, 1.13 + reason: "Should be able to get named items by name" }), 1.14 + "*"); 1.15 + window.parent.postMessage("finish", "*"); 1.16 + } 1.17 + 1.18 + window.onmessage = function(ev) { 1.19 + if (ev.data == "start") { 1.20 + doIt(); 1.21 + } 1.22 + } 1.23 + 1.24 + document.domain = "example.org"; 1.25 + </script> 1.26 + </head> 1.27 + <body> 1.28 + <iframe id="subframe"></iframe> 1.29 + <script> 1.30 + document.getElementById("subframe").src = 1.31 + "http://test2.example.org" + 1.32 + location.pathname.replace(/file1_bug629227.html/, "file2_bug629227.html"); 1.33 + </script> 1.34 + </body> 1.35 +</html>