PageRenderTime 31ms CodeModel.GetById 27ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

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

http://github.com/zpao/v8monkey
Unknown | 105 lines | 95 code | 10 blank | 0 comment | 0 complexity | 6955e4fcee241bd93144a7bcca33561d 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, billboard, license, 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_BILLBOARD,
 28  extraDelayedCheckFunction: checkRemoteContentState,
 29  expectedRemoteContentState: "loading",
 30  extraDelayedFinishFunction: addRemoteContentLoadListener
 31}, {
 32  pageid: PAGEID_FOUND_BILLBOARD,
 33  extraStartFunction: waitForRemoteContentLoaded,
 34  expectedRemoteContentState: "loaded",
 35  buttonClick: "next"
 36}, {
 37  pageid: PAGEID_LICENSE,
 38  extraCheckFunction: checkRadioGroupSelectedIndex,
 39  expectedRadioGroupSelectedIndex: 1,
 40  extraDelayedCheckFunction: checkRemoteContentState,
 41  expectedRemoteContentState: "loading",
 42  extraDelayedFinishFunction: addRemoteContentLoadListener
 43}, {
 44  pageid: PAGEID_LICENSE,
 45  extraStartFunction: waitForRemoteContentLoaded,
 46  expectedRemoteContentState: "loaded",
 47  extraCheckFunction: checkRadioGroupSelectedIndex,
 48  expectedRadioGroupSelectedIndex: 1,
 49  extraDelayedFinishFunction: addRadioGroupSelectListenerAndClick,
 50  radioClick: "accept"
 51}, {
 52  pageid: PAGEID_LICENSE,
 53  extraCheckFunction: checkRadioGroupSelectedIndex,
 54  expectedRadioGroupSelectedIndex: 0,
 55  buttonClick: "extra1"
 56}, {
 57  pageid: PAGEID_FOUND_BILLBOARD,
 58  extraCheckFunction: checkRemoteContentState,
 59  expectedRemoteContentState: "loaded",
 60  buttonClick: "next"
 61}, {
 62  pageid: PAGEID_LICENSE,
 63  extraCheckFunction: checkRadioGroupSelectedIndex,
 64  expectedRadioGroupSelectedIndex: 0,
 65  extraDelayedFinishFunction: addRadioGroupSelectListenerAndClick,
 66  radioClick: "decline"
 67}, {
 68  pageid: PAGEID_LICENSE,
 69  extraCheckFunction: checkRadioGroupSelectedIndex,
 70  expectedRadioGroupSelectedIndex: 1,
 71  extraDelayedFinishFunction: addRadioGroupSelectListenerAndClick,
 72  radioClick: "accept"
 73}, {
 74  pageid: PAGEID_LICENSE,
 75  extraCheckFunction: checkRadioGroupSelectedIndex,
 76  expectedRadioGroupSelectedIndex: 0,
 77  buttonClick: "next"
 78}, {
 79  pageid: PAGEID_DOWNLOADING
 80}, {
 81  pageid: PAGEID_FINISHED,
 82  buttonClick: "extra1"
 83} ];
 84
 85gDisableNoUpdateAddon = true;
 86
 87function runTest() {
 88  debugDump("entering");
 89
 90  let url = URL_UPDATE + "?showBillboard=1&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>