webapprt/content/mochitest.xul
author Matt Woodrow <mwoodrow@mozilla.com>
Wed, 07 Nov 2012 19:56:56 +1300
changeset 120458 8083f88251535741731f6485c77f895e09b5d78b
parent 107896 07b53bdc212ac3876cea6c2c7906e3106985043e
child 155914 4a6b9390ff5a2a8de95d91bbc1e8d44d75c91375
permissions -rw-r--r--
Bug 808469 - Use gfxQuartzSurface for OMTC drawing on mac. r=cjones

<?xml version="1.0"?>

<!-- This Source Code Form is subject to the terms of the Mozilla Public
   - License, v. 2.0. If a copy of the MPL was not distributed with this file,
   - You can obtain one at http://mozilla.org/MPL/2.0/.  -->

<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>

<window windowtype="webapprt:mochitest"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

<script type="application/javascript" src="chrome://webapprt/content/mochitest.js"/>

<script type="application/javascript">
  Cu.import("resource://webapprt/modules/WebappRT.jsm");

  // In test mode, the runtime isn't configured until we tell it to become
  // an app, which requires us to use DOMApplicationRegistry to install one.
  // But DOMApplicationRegistry needs to know the location of its registry dir,
  // so we need to configure the runtime with at least that information.
  WebappRT.config = {
    registryDir: Services.dirsvc.get("ProfD", Ci.nsIFile).path,
  };

  Cu.import("resource://gre/modules/Webapps.jsm");

  DOMApplicationRegistry.allAppsLaunchable = true;

  becomeWebapp("http://mochi.test:8888/tests/webapprt/test/content/test.webapp",
               undefined, function onBecome() {
    Services.ww.openWindow(
      null,
      "chrome://webapprt/content/webapp.xul",
      "_blank",
      "chrome,dialog=no,resizable,scrollbars,centerscreen",
      window.arguments[0]
    );
    window.close();
  });
</script>

<description value="WebappRT Test Shim"/>

</window>