2012-04-24 20:05:01 -07:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
|
|
|
|
<!-- Any copyright is dedicated to the Public Domain.
|
2012-09-05 10:08:54 -07:00
|
|
|
- http://creativecommons.org/publicdomain/zero/1.0/ -->
|
|
|
|
|
|
|
|
<?xml-stylesheet type="text/css" href="chrome://global/skin"?>
|
|
|
|
<?xml-stylesheet type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"?>
|
2012-04-24 20:05:01 -07:00
|
|
|
|
2012-09-05 10:08:54 -07:00
|
|
|
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
|
|
|
title="Mozilla Bug 741549">
|
2012-04-24 20:05:01 -07:00
|
|
|
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
|
2012-09-05 10:08:54 -07:00
|
|
|
<script type="application/javascript" src="head.js"/>
|
2012-04-24 20:05:01 -07:00
|
|
|
<!-- test results are displayed in the html:body -->
|
|
|
|
<body xmlns="http://www.w3.org/1999/xhtml">
|
|
|
|
<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=741549"
|
|
|
|
target="_blank">Mozilla Bug 741549</a>
|
|
|
|
</body>
|
|
|
|
|
2012-09-05 10:08:54 -07:00
|
|
|
<script>
|
|
|
|
|
|
|
|
var props = {
|
|
|
|
QueryInterface: "function",
|
2012-10-02 13:38:51 -07:00
|
|
|
checkInstalled: "function",
|
2012-09-05 10:08:54 -07:00
|
|
|
getInstalled: "function",
|
|
|
|
getSelf: "function",
|
|
|
|
install: "function",
|
2013-08-01 17:00:39 -07:00
|
|
|
installPackage: "function",
|
2012-09-05 10:08:54 -07:00
|
|
|
mgmt: "object",
|
|
|
|
};
|
|
|
|
|
|
|
|
isDeeply([p for (p in navigator.mozApps)].sort(), Object.keys(props).sort(),
|
|
|
|
"navigator.mozApps has only the expected properties");
|
|
|
|
|
|
|
|
for (var p in props) {
|
|
|
|
is(typeof navigator.mozApps[p], props[p], "typeof " + p);
|
|
|
|
}
|
|
|
|
|
|
|
|
var mgmtProps = {
|
|
|
|
QueryInterface: "function",
|
2012-09-26 18:01:20 -07:00
|
|
|
applyDownload: "function",
|
2012-09-05 10:08:54 -07:00
|
|
|
getAll: "function",
|
|
|
|
getNotInstalled: "function",
|
2013-01-11 04:50:50 -08:00
|
|
|
uninstall: "function",
|
2012-09-05 10:08:54 -07:00
|
|
|
oninstall: "object",
|
|
|
|
onuninstall: "object",
|
|
|
|
};
|
|
|
|
|
|
|
|
isDeeply([p for (p in navigator.mozApps.mgmt)].sort(),
|
|
|
|
Object.keys(mgmtProps).sort(),
|
|
|
|
"navigator.mozApps.mgmt has only the expected properties");
|
|
|
|
|
|
|
|
for (var p in mgmtProps) {
|
|
|
|
is(typeof navigator.mozApps.mgmt[p], mgmtProps[p], "typeof mgmt." + p);
|
|
|
|
}
|
|
|
|
|
|
|
|
</script>
|
2012-04-24 20:05:01 -07:00
|
|
|
</window>
|