PageRenderTime 13ms CodeModel.GetById 8ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/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
  8<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
  9<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
 10
 11<window title="Update Wizard pages: update check, add-ons check, basic, license, add-ons list, download, and finished"
 12        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
 13        onload="runTestDefault();">
 14<script type="application/javascript"
 15        src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
 16<script type="application/javascript"
 17        src="utils.js"/>
 18
 19<script type="application/javascript">
 20<![CDATA[
 21
 22const TESTS = [ {
 23  pageid: PAGEID_CHECKING
 24}, {
 25  pageid: PAGEID_INCOMPAT_CHECK
 26}, {
 27  pageid: PAGEID_FOUND_BASIC,
 28  buttonClick: "next"
 29}, {
 30  pageid: PAGEID_LICENSE,
 31  extraCheckFunction: checkRadioGroupSelectedIndex,
 32  expectedRadioGroupSelectedIndex: 1,
 33  extraDelayedCheckFunction: checkRemoteContentState,
 34  expectedRemoteContentState: "loading",
 35  extraDelayedFinishFunction: addRemoteContentLoadListener
 36}, {
 37  pageid: PAGEID_LICENSE,
 38  extraStartFunction: waitForRemoteContentLoaded,
 39  expectedRemoteContentState: "loaded",
 40  extraCheckFunction: checkRadioGroupSelectedIndex,
 41  expectedRadioGroupSelectedIndex: 1,
 42  extraDelayedFinishFunction: addRadioGroupSelectListenerAndClick,
 43  radioClick: "accept"
 44}, {
 45  pageid: PAGEID_LICENSE,
 46  extraCheckFunction: checkRadioGroupSelectedIndex,
 47  expectedRadioGroupSelectedIndex: 0,
 48  buttonClick: "next"
 49}, {
 50  pageid: PAGEID_INCOMPAT_LIST,
 51  extraDelayedCheckFunction: checkIncompatbleList,
 52  buttonClick: "extra1"
 53}, {
 54  pageid: PAGEID_LICENSE,
 55  buttonClick: "extra1"
 56}, {
 57  pageid: PAGEID_FOUND_BASIC,
 58  buttonClick: "next"
 59}, {
 60  pageid: PAGEID_LICENSE,
 61  extraCheckFunction: checkRadioGroupSelectedIndex,
 62  expectedRadioGroupSelectedIndex: 0,
 63  extraDelayedFinishFunction: addRadioGroupSelectListenerAndClick,
 64  radioClick: "decline"
 65}, {
 66  pageid: PAGEID_LICENSE,
 67  extraCheckFunction: checkRadioGroupSelectedIndex,
 68  expectedRadioGroupSelectedIndex: 1,
 69  extraDelayedFinishFunction: addRadioGroupSelectListenerAndClick,
 70  radioClick: "accept"
 71}, {
 72  pageid: PAGEID_LICENSE,
 73  extraCheckFunction: checkRadioGroupSelectedIndex,
 74  expectedRadioGroupSelectedIndex: 0,
 75  buttonClick: "next"
 76}, {
 77  pageid: PAGEID_INCOMPAT_LIST,
 78  extraDelayedCheckFunction: checkIncompatbleList,
 79  buttonClick: "next"
 80}, {
 81  pageid: PAGEID_DOWNLOADING
 82}, {
 83  pageid: PAGEID_FINISHED,
 84  buttonClick: "extra1"
 85} ];
 86
 87function runTest() {
 88  debugDump("entering");
 89
 90  let url = URL_UPDATE + "?showLicense=1&showDetails=1" +
 91            getVersionParams(getNewerAppVersion(), getNewerPlatformVersion());
 92  setUpdateURLOverride(url);
 93
 94  gUP.checkForUpdates();
 95}
 96
 97]]>
 98</script>
 99
100<body xmlns="http://www.w3.org/1999/xhtml">
101  <p id="display"></p>
102  <div id="content" style="display: none"></div>
103  <pre id="test"></pre>
104</body>
105</window>