Thu, 15 Jan 2015 15:55:04 +0100
Back out 97036ab72558 which inappropriately compared turds to third parties.
1 <html>
2 <head>
3 <script>
5 window.addEventListener("message", onMessageReceived, false);
7 function postMsg(msg)
8 {
9 parent.postMessage(msg, "http://mochi.test:8888");
10 }
12 function onMessageReceived(event)
13 {
14 if (event.data == "check") {
15 postMsg(sessionStorage.getItem("foo"));
17 var gotValue = "threw";
18 try {
19 gotValue = sessionStorage.getItem("foo-https");
20 } catch (e) {
21 }
23 postMsg(gotValue);
25 postMsg("the end");
26 }
27 }
29 function start()
30 {
31 sessionStorage.setItem("foo", "insecure");
32 postMsg(sessionStorage.getItem("foo"));
33 }
35 </script>
36 </head>
37 <body onload="start();">
38 insecure
39 </body>
40 </html>