dom/tests/mochitest/webapps/test_list_api.xul

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 <?xml version="1.0"?>
     3 <!-- Any copyright is dedicated to the Public Domain.
     4    - http://creativecommons.org/publicdomain/zero/1.0/ -->
     6 <?xml-stylesheet type="text/css" href="chrome://global/skin"?>
     7 <?xml-stylesheet type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"?>
     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>
    19 <script>
    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 };
    31 isDeeply([p for (p in navigator.mozApps)].sort(), Object.keys(props).sort(),
    32          "navigator.mozApps has only the expected properties");
    34 for (var p in props) {
    35   is(typeof navigator.mozApps[p], props[p], "typeof " + p);
    36 }
    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 };
    48 isDeeply([p for (p in navigator.mozApps.mgmt)].sort(),
    49          Object.keys(mgmtProps).sort(),
    50          "navigator.mozApps.mgmt has only the expected properties");
    52 for (var p in mgmtProps) {
    53   is(typeof navigator.mozApps.mgmt[p], mgmtProps[p], "typeof mgmt." + p);
    54 }
    56 </script>
    57 </window>

mercurial