author Myk Melez <myk@mozilla.org>
Tue, 14 Aug 2012 15:27:26 -0700
changeset 107896 07b53bdc212ac3876cea6c2c7906e3106985043e
parent 102795 df17f2f4ab63777c252b88b9e68211422a9c4501
permissions -rw-r--r--
bug 770770: refactor webapp runtime test harness to reduce complexity/special-casing; r=adw


  This is a sample WebappRT content mochitest.  Since its name is prefixed with
  webapprt_, this file is picked up by the Mochitest harness.  It's just a plain
  mochitest that runs in the app browser within an app window.

    <meta charset="utf-8">
    <script src="/tests/SimpleTest/SimpleTest.js"></script>
    <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    <p id="display">
      This is the sample WebappRT content mochitest.
    <div id="content" style="display: none"></div>
    <pre id="test">


ok(true, "true is true!");

var self = navigator.mozApps.getSelf();
self.onsuccess = function () {
  ok(true, "onsuccess should be called");
  ok(self.result, "result should be nonnull");
  ok(self.result.manifest, "manifest should be nonnull");
  is(self.result.manifest.name, "WebappRT Mochitest Webapp",
self.onerror = function () {
  ok(false, "onerror should not be called");