1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/webapprt/test/chrome/sample.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,30 @@ 1.4 +<!DOCTYPE HTML> 1.5 + 1.6 +<!-- 1.7 + This is the webapp. It doesn't need to do anything in particular, just 1.8 + whatever you want to test from your browser_ test file. 1.9 +--> 1.10 + 1.11 +<html> 1.12 + <head> 1.13 + <meta charset="utf-8"> 1.14 + <script> 1.15 + 1.16 +function onLoad() { 1.17 + var msg = document.getElementById("msg"); 1.18 + var self = navigator.mozApps.getSelf(); 1.19 + self.onsuccess = function () { 1.20 + msg.textContent = "Webapp getSelf OK: " + self.result; 1.21 + }; 1.22 + self.onerror = function () { 1.23 + msg.textContent = "Webapp getSelf failed: " + self.error.name; 1.24 + }; 1.25 +} 1.26 + 1.27 + </script> 1.28 + </head> 1.29 + <body onload="onLoad();" onunload=""> 1.30 + <p>This is the test webapp.</p> 1.31 + <p id="msg">Webapp waiting for page load...</p> 1.32 + </body> 1.33 +</html>