|
1 <?xml version="1.0"?> |
|
2 |
|
3 <!-- Any copyright is dedicated to the Public Domain. |
|
4 - http://creativecommons.org/publicdomain/zero/1.0/ --> |
|
5 |
|
6 <?xml-stylesheet type="text/css" href="chrome://global/skin"?> |
|
7 <?xml-stylesheet type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"?> |
|
8 |
|
9 <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" |
|
10 title="Mozilla Bug 741549"> |
|
11 <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/> |
|
12 <script type="application/javascript" src="head.js"/> |
|
13 <!-- test results are displayed in the html:body --> |
|
14 <body xmlns="http://www.w3.org/1999/xhtml"> |
|
15 <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=741549" |
|
16 target="_blank">Mozilla Bug 741549</a> |
|
17 </body> |
|
18 |
|
19 <script> |
|
20 |
|
21 var props = { |
|
22 QueryInterface: "function", |
|
23 checkInstalled: "function", |
|
24 getInstalled: "function", |
|
25 getSelf: "function", |
|
26 install: "function", |
|
27 installPackage: "function", |
|
28 mgmt: "object", |
|
29 }; |
|
30 |
|
31 isDeeply([p for (p in navigator.mozApps)].sort(), Object.keys(props).sort(), |
|
32 "navigator.mozApps has only the expected properties"); |
|
33 |
|
34 for (var p in props) { |
|
35 is(typeof navigator.mozApps[p], props[p], "typeof " + p); |
|
36 } |
|
37 |
|
38 var mgmtProps = { |
|
39 QueryInterface: "function", |
|
40 applyDownload: "function", |
|
41 getAll: "function", |
|
42 getNotInstalled: "function", |
|
43 uninstall: "function", |
|
44 oninstall: "object", |
|
45 onuninstall: "object", |
|
46 }; |
|
47 |
|
48 isDeeply([p for (p in navigator.mozApps.mgmt)].sort(), |
|
49 Object.keys(mgmtProps).sort(), |
|
50 "navigator.mozApps.mgmt has only the expected properties"); |
|
51 |
|
52 for (var p in mgmtProps) { |
|
53 is(typeof navigator.mozApps.mgmt[p], mgmtProps[p], "typeof mgmt." + p); |
|
54 } |
|
55 |
|
56 </script> |
|
57 </window> |