dom/tests/mochitest/webapps/test_list_api.xul

Thu, 15 Jan 2015 15:55:04 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:55:04 +0100
branch
TOR_BUG_9701
changeset 9
a63d609f5ebe
permissions
-rw-r--r--

Back out 97036ab72558 which inappropriately compared turds to third parties.

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

mercurial