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 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>Username/password page for postMessage tests</title>
5 <script type="application/javascript">
7 function sendMessage(evt)
8 {
9 var msg = "child-message";
11 if (evt.origin !== "http://mochi.test:8888")
12 msg += " wrong-origin(" + evt.origin + ")";
13 if (evt.data !== "parent-message")
14 msg += " wrong-data(" + evt.data + ")";
15 if (evt.lastEventId !== "")
16 msg += " wrong-lastEventId(" + evt.lastEventId + ")";
17 if (evt.source !== window.parent)
18 msg += " wrong-source";
20 // It would be good to guarantee that we've been opened with a userinfo of
21 // "bobhope:password", but Gecko elides that from the content-visible URL,
22 // and I can't find another way to actually detect this programmatically.
24 window.parent.postMessage(msg, "http://mochi.test:8888");
25 }
27 window.addEventListener("message", sendMessage, false);
28 </script>
29 </head>
30 <body>
31 <p>Kid iframe</p>
32 </body>
33 </html>