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.

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

mercurial