browser/base/content/test/social/social_chat.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/browser/base/content/test/social/social_chat.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,32 @@
     1.4 +<html>
     1.5 +  <head>
     1.6 +    <meta charset="utf-8">
     1.7 +    <script>
     1.8 +      function pingWorker() {
     1.9 +        var port = navigator.mozSocial.getWorker().port;
    1.10 +        port.postMessage({topic: "chatbox-message", result: "ok"});
    1.11 +      }
    1.12 +      window.addEventListener("socialFrameShow", function(e) {
    1.13 +        var port = navigator.mozSocial.getWorker().port;
    1.14 +        port.postMessage({topic: "chatbox-visibility", result: "shown"});
    1.15 +      }, false);
    1.16 +      window.addEventListener("socialFrameHide", function(e) {
    1.17 +        var port = navigator.mozSocial.getWorker().port;
    1.18 +        port.postMessage({topic: "chatbox-visibility", result: "hidden"});
    1.19 +      }, false);
    1.20 +      window.addEventListener("socialTest-CloseSelf", function(e) {
    1.21 +        window.close();
    1.22 +      }, false);
    1.23 +    </script>
    1.24 +    <title>test chat window</title>
    1.25 +  </head>
    1.26 +  <body onload="pingWorker();">
    1.27 +    <p>This is a test social chat window.</p>
    1.28 +    <!-- a couple of input fields to help with focus testing -->
    1.29 +    <input id="input1"/>
    1.30 +    <input id="input2"/>
    1.31 +
    1.32 +    <!-- an iframe here so this one page generates multiple load events -->
    1.33 +    <iframe id="iframe" src="data:text/plain:this is an iframe"></iframe>
    1.34 +  </body>
    1.35 +</html>

mercurial