toolkit/mozapps/update/tests/chrome/test_0094_restartNotification_remote.xul

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/toolkit/mozapps/update/tests/chrome/test_0094_restartNotification_remote.xul	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,64 @@
     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 +-->
    1.10 +
    1.11 +<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
    1.12 +<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
    1.13 +
    1.14 +<window title="Update Wizard pages: restart notification xml promptWaitTime"
    1.15 +        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
    1.16 +        onload="runTestDefault();">
    1.17 +<script type="application/javascript"
    1.18 +        src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
    1.19 +<script type="application/javascript"
    1.20 +        src="utils.js"/>
    1.21 +
    1.22 +<script type="application/javascript">
    1.23 +<![CDATA[
    1.24 +
    1.25 +const TESTS = [ {
    1.26 +  pageid: PAGEID_FINISHED_BKGRD,
    1.27 +  buttonClick: "extra1"
    1.28 +} ];
    1.29 +
    1.30 +function runTest() {
    1.31 +  debugDump("entering");
    1.32 +
    1.33 +  let patches = getLocalPatchString("complete", null, null, null, null, null,
    1.34 +                                    STATE_PENDING);
    1.35 +  let updates = getLocalUpdateString(patches, null, null, null,
    1.36 +                                     Services.appinfo.version,
    1.37 +                                     Services.appinfo.platformVersion,
    1.38 +                                     null, null, null,
    1.39 +                                     null, null, null,
    1.40 +                                     null, false, null,
    1.41 +                                     false, false,
    1.42 +                                     false, 1);
    1.43 +  writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
    1.44 +  writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
    1.45 +  writeStatusFile(STATE_SUCCEEDED);
    1.46 +    
    1.47 +  reloadUpdateManagerData();
    1.48 +
    1.49 +  is(gUpdateManager.activeUpdate.state, STATE_PENDING,
    1.50 +     "The active update should have a state of " + STATE_PENDING);
    1.51 +
    1.52 +  ok(gUpdateManager.activeUpdate.promptWaitTime == 1, "Checking that the " +
    1.53 +     "update's promptWaitTime attribute value was set by the XML");
    1.54 +    
    1.55 +  gUP.showUpdateDownloaded(gUpdateManager.activeUpdate, true);
    1.56 +
    1.57 +}
    1.58 +
    1.59 +]]>
    1.60 +</script>
    1.61 +
    1.62 +<body xmlns="http://www.w3.org/1999/xhtml">
    1.63 +  <p id="display"></p>
    1.64 +  <div id="content" style="display: none"></div>
    1.65 +  <pre id="test"></pre>
    1.66 +</body>
    1.67 +</window>

mercurial