gecko/dom/tests/mochitest/webapps/test_list_api.xul

58 lines
1.7 KiB
XML

<?xml version="1.0"?>
<!-- Any copyright is dedicated to the Public Domain.
- 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"?>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
title="Mozilla Bug 741549">
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
<script type="application/javascript" src="head.js"/>
<!-- 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>
<script>
var props = {
QueryInterface: "function",
checkInstalled: "function",
getInstalled: "function",
getSelf: "function",
install: "function",
installPackage: "function",
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",
applyDownload: "function",
getAll: "function",
getNotInstalled: "function",
uninstall: "function",
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>
</window>