summaryrefslogtreecommitdiffstats
path: root/chrome_frame/test/data/privileged_apis_frame.html
blob: 9e51152d8a6c76ed056712ecab890e09042906eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<!-- saved from url=(0014)about:internet -->
<html>
<!-- This page is meant to load inside ChromeFrame -->
  <head>
    <script type="text/javascript" src="chrome_frame_tester_helpers.js">
    </script>
    <script type="text/javascript">
      function OnLoad() {
        externalHost.onmessage = OnHostMessage;
      }

      function OnHostMessage(evt) {
        // Any time we receive a message, we reflect it back both
        // with a nonsensical target, and with "*".
        appendStatus('Host message: ' + evt.data);
        externalHost.postMessage(evt.data,
                                 "privileged_target");
        appendStatus('After postMessage(' + evt.data + ', "privileged_target)"');
        externalHost.postMessage(evt.data);
        appendStatus('After postMessage(' + evt.data + '")');
      }
    </script>
  </head>

  <body onload="OnLoad();">
    <div id="statusPanel" style="border: 1px solid red; width: 100%">
      Test running....
    </div>

    <p>ChromeFrame PrivilegeApis Test
    <br>Tests that private messaging is not available to regular web pages</p>
  </body>
</html>