/toolkit/mozapps/update/test/chrome/test_0073_notify_verifyFailPartialComplete.xul

http://github.com/zpao/v8monkey · Unknown · 57 lines · 46 code · 11 blank · 0 comment · 0 complexity · ebca9463ce647b20ccfbae3e35b3264c MD5 · raw file

  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. -->
  7. <?xml-stylesheet href="chrome://global/skin" type="text/css"?>
  8. <?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
  9. <window title="Update Wizard pages: errors (partial and complete patches with invalid hashes)"
  10. xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  11. onload="runTestDefault();">
  12. <script type="application/javascript"
  13. src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
  14. <script type="application/javascript"
  15. src="utils.js"/>
  16. <script type="application/javascript">
  17. <![CDATA[
  18. const TESTS = [ {
  19. pageid: PAGEID_ERRORS,
  20. buttonClick: "finish"
  21. } ];
  22. function runTest() {
  23. debugDump("entering");
  24. let patches = getLocalPatchString("partial", null, null, "1234", null, null,
  25. STATE_DOWNLOADING) +
  26. getLocalPatchString("complete", null, null, "1234", null,
  27. "false");
  28. let updates = getLocalUpdateString(patches, null, null, null,
  29. Services.appinfo.version,
  30. Services.appinfo.platformVersion, null,
  31. null, null, null, null, null, null,
  32. "false");
  33. writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
  34. writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
  35. writeStatusFile(STATE_DOWNLOADING);
  36. reloadUpdateManagerData();
  37. initUpdateServiceStub();
  38. }
  39. ]]>
  40. </script>
  41. <body xmlns="http://www.w3.org/1999/xhtml">
  42. <p id="display"></p>
  43. <div id="content" style="display: none"></div>
  44. <pre id="test"></pre>
  45. </body>
  46. </window>