This repository has been archived by the owner on Aug 4, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathmochitest.xul
44 lines (33 loc) · 1.48 KB
/
mochitest.xul
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?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>