1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/browser/base/content/test/social/social_flyout.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,37 @@ 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: "flyout-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: "flyout-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: "flyout-visibility", result: "hidden"}); 1.19 + }, false); 1.20 + window.addEventListener("socialTest-MakeWider", function(e) { 1.21 + document.body.setAttribute("style", "width: 500px; height: 500px; margin: 0; overflow: hidden;"); 1.22 + document.body.offsetWidth; // force a layout flush 1.23 + var evt = document.createEvent("CustomEvent"); 1.24 + evt.initCustomEvent("SocialTest-DoneMakeWider", true, true, {}); 1.25 + document.documentElement.dispatchEvent(evt); 1.26 + }, false); 1.27 + window.addEventListener("socialTest-CloseSelf", function(e) { 1.28 + window.close(); 1.29 + var evt = document.createEvent("CustomEvent"); 1.30 + evt.initCustomEvent("SocialTest-DoneCloseSelf", true, true, {}); 1.31 + document.documentElement.dispatchEvent(evt); 1.32 + }, false); 1.33 + </script> 1.34 + </head> 1.35 + <body style="width: 400px; height: 400px; margin: 0; overflow: hidden;" onload="pingWorker();"> 1.36 + <p>This is a test social flyout panel.</p> 1.37 + <a id="traversal" href="http://mochi.test">test link</a> 1.38 + </body> 1.39 +</html> 1.40 +