js/xpconnect/tests/mochitest/file1_bug629227.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 <!DOCTYPE html>
michael@0 2 <html>
michael@0 3 <head>
michael@0 4 <script>
michael@0 5 function doIt() {
michael@0 6 var doc = window.frames[0].document;
michael@0 7 var ok = (doc.form1 == doc.getElementById("test1"));
michael@0 8 window.parent.postMessage(
michael@0 9 JSON.stringify({ ok: ok,
michael@0 10 reason: "Should be able to get named items by name" }),
michael@0 11 "*");
michael@0 12 window.parent.postMessage("finish", "*");
michael@0 13 }
michael@0 14
michael@0 15 window.onmessage = function(ev) {
michael@0 16 if (ev.data == "start") {
michael@0 17 doIt();
michael@0 18 }
michael@0 19 }
michael@0 20
michael@0 21 document.domain = "example.org";
michael@0 22 </script>
michael@0 23 </head>
michael@0 24 <body>
michael@0 25 <iframe id="subframe"></iframe>
michael@0 26 <script>
michael@0 27 document.getElementById("subframe").src =
michael@0 28 "http://test2.example.org" +
michael@0 29 location.pathname.replace(/file1_bug629227.html/, "file2_bug629227.html");
michael@0 30 </script>
michael@0 31 </body>
michael@0 32 </html>

mercurial