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

http://github.com/zpao/v8monkey · Unknown · 105 lines · 96 code · 9 blank · 0 comment · 0 complexity · 9738b7002e26feac165514428644c41d 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: update check, add-ons check, basic, license, add-ons list, download, and finished"
  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_CHECKING
  20. }, {
  21. pageid: PAGEID_INCOMPAT_CHECK
  22. }, {
  23. pageid: PAGEID_FOUND_BASIC,
  24. buttonClick: "next"
  25. }, {
  26. pageid: PAGEID_LICENSE,
  27. extraCheckFunction: checkRadioGroupSelectedIndex,
  28. expectedRadioGroupSelectedIndex: 1,
  29. extraDelayedCheckFunction: checkRemoteContentState,
  30. expectedRemoteContentState: "loading",
  31. extraDelayedFinishFunction: addRemoteContentLoadListener
  32. }, {
  33. pageid: PAGEID_LICENSE,
  34. extraStartFunction: waitForRemoteContentLoaded,
  35. expectedRemoteContentState: "loaded",
  36. extraCheckFunction: checkRadioGroupSelectedIndex,
  37. expectedRadioGroupSelectedIndex: 1,
  38. extraDelayedFinishFunction: addRadioGroupSelectListenerAndClick,
  39. radioClick: "accept"
  40. }, {
  41. pageid: PAGEID_LICENSE,
  42. extraCheckFunction: checkRadioGroupSelectedIndex,
  43. expectedRadioGroupSelectedIndex: 0,
  44. buttonClick: "next"
  45. }, {
  46. pageid: PAGEID_INCOMPAT_LIST,
  47. extraDelayedCheckFunction: checkIncompatbleList,
  48. buttonClick: "extra1"
  49. }, {
  50. pageid: PAGEID_LICENSE,
  51. buttonClick: "extra1"
  52. }, {
  53. pageid: PAGEID_FOUND_BASIC,
  54. buttonClick: "next"
  55. }, {
  56. pageid: PAGEID_LICENSE,
  57. extraCheckFunction: checkRadioGroupSelectedIndex,
  58. expectedRadioGroupSelectedIndex: 0,
  59. extraDelayedFinishFunction: addRadioGroupSelectListenerAndClick,
  60. radioClick: "decline"
  61. }, {
  62. pageid: PAGEID_LICENSE,
  63. extraCheckFunction: checkRadioGroupSelectedIndex,
  64. expectedRadioGroupSelectedIndex: 1,
  65. extraDelayedFinishFunction: addRadioGroupSelectListenerAndClick,
  66. radioClick: "accept"
  67. }, {
  68. pageid: PAGEID_LICENSE,
  69. extraCheckFunction: checkRadioGroupSelectedIndex,
  70. expectedRadioGroupSelectedIndex: 0,
  71. buttonClick: "next"
  72. }, {
  73. pageid: PAGEID_INCOMPAT_LIST,
  74. extraDelayedCheckFunction: checkIncompatbleList,
  75. buttonClick: "next"
  76. }, {
  77. pageid: PAGEID_DOWNLOADING
  78. }, {
  79. pageid: PAGEID_FINISHED,
  80. buttonClick: "extra1"
  81. } ];
  82. function runTest() {
  83. debugDump("entering");
  84. let url = URL_UPDATE + "?showLicense=1&showDetails=1" +
  85. getVersionParams(getNewerAppVersion(), getNewerPlatformVersion());
  86. setUpdateURLOverride(url);
  87. gUP.checkForUpdates();
  88. }
  89. ]]>
  90. </script>
  91. <body xmlns="http://www.w3.org/1999/xhtml">
  92. <p id="display"></p>
  93. <div id="content" style="display: none"></div>
  94. <pre id="test"></pre>
  95. </body>
  96. </window>