webapprt/test/chrome/sample.html
author Drew Willcoxon <adw@mozilla.com>
Fri, 29 Jun 2012 15:52:43 -0700
changeset 103280 df17f2f4ab63777c252b88b9e68211422a9c4501
permissions -rw-r--r--
Bug 733631 - Create a unit test infrastructure for the webapp runtime. r=myk,felipc,ctalbert

<!DOCTYPE HTML>

<!--
  This is the webapp.  It doesn't need to do anything in particular, just
  whatever you want to test from your browser_ test file.
-->

<html>
  <head>
    <meta charset="utf-8">
    <script>

function onLoad() {
  var msg = document.getElementById("msg");
  var self = navigator.mozApps.getSelf();
  self.onsuccess = function () {
    msg.textContent = "Webapp getSelf OK: " + self.result;
  };
  self.onerror = function () {
    msg.textContent = "Webapp getSelf failed: " + self.error.name;
  };
}

    </script>
  </head>
  <body onload="onLoad();" onunload="">
    <p>This is the test webapp.</p>
    <p id="msg">Webapp waiting for page load...</p>
  </body>
</html>