1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/tests/mochitest/webapps/test_list_api.xul Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,57 @@ 1.4 +<?xml version="1.0"?> 1.5 + 1.6 +<!-- Any copyright is dedicated to the Public Domain. 1.7 + - http://creativecommons.org/publicdomain/zero/1.0/ --> 1.8 + 1.9 +<?xml-stylesheet type="text/css" href="chrome://global/skin"?> 1.10 +<?xml-stylesheet type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"?> 1.11 + 1.12 +<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" 1.13 + title="Mozilla Bug 741549"> 1.14 + <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/> 1.15 + <script type="application/javascript" src="head.js"/> 1.16 + <!-- test results are displayed in the html:body --> 1.17 + <body xmlns="http://www.w3.org/1999/xhtml"> 1.18 + <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=741549" 1.19 + target="_blank">Mozilla Bug 741549</a> 1.20 + </body> 1.21 + 1.22 +<script> 1.23 + 1.24 +var props = { 1.25 + QueryInterface: "function", 1.26 + checkInstalled: "function", 1.27 + getInstalled: "function", 1.28 + getSelf: "function", 1.29 + install: "function", 1.30 + installPackage: "function", 1.31 + mgmt: "object", 1.32 +}; 1.33 + 1.34 +isDeeply([p for (p in navigator.mozApps)].sort(), Object.keys(props).sort(), 1.35 + "navigator.mozApps has only the expected properties"); 1.36 + 1.37 +for (var p in props) { 1.38 + is(typeof navigator.mozApps[p], props[p], "typeof " + p); 1.39 +} 1.40 + 1.41 +var mgmtProps = { 1.42 + QueryInterface: "function", 1.43 + applyDownload: "function", 1.44 + getAll: "function", 1.45 + getNotInstalled: "function", 1.46 + uninstall: "function", 1.47 + oninstall: "object", 1.48 + onuninstall: "object", 1.49 +}; 1.50 + 1.51 +isDeeply([p for (p in navigator.mozApps.mgmt)].sort(), 1.52 + Object.keys(mgmtProps).sort(), 1.53 + "navigator.mozApps.mgmt has only the expected properties"); 1.54 + 1.55 +for (var p in mgmtProps) { 1.56 + is(typeof navigator.mozApps.mgmt[p], mgmtProps[p], "typeof mgmt." + p); 1.57 +} 1.58 + 1.59 +</script> 1.60 +</window>