1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/toolkit/mozapps/update/tests/chrome/test_0022_check_billboard_license.xul Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,101 @@ 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: update check, billboard, license, download, and finished" 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_CHECKING 1.27 +}, { 1.28 + pageid: PAGEID_FOUND_BILLBOARD, 1.29 + extraDelayedCheckFunction: checkRemoteContentState, 1.30 + expectedRemoteContentState: "loading", 1.31 + extraDelayedFinishFunction: addRemoteContentLoadListener 1.32 +}, { 1.33 + pageid: PAGEID_FOUND_BILLBOARD, 1.34 + extraStartFunction: waitForRemoteContentLoaded, 1.35 + expectedRemoteContentState: "loaded", 1.36 + buttonClick: "next" 1.37 +}, { 1.38 + pageid: PAGEID_LICENSE, 1.39 + extraCheckFunction: checkRadioGroupSelectedIndex, 1.40 + expectedRadioGroupSelectedIndex: 1, 1.41 + extraDelayedCheckFunction: checkRemoteContentState, 1.42 + expectedRemoteContentState: "loading", 1.43 + extraDelayedFinishFunction: addRemoteContentLoadListener 1.44 +}, { 1.45 + pageid: PAGEID_LICENSE, 1.46 + extraStartFunction: waitForRemoteContentLoaded, 1.47 + expectedRemoteContentState: "loaded", 1.48 + extraCheckFunction: checkRadioGroupSelectedIndex, 1.49 + expectedRadioGroupSelectedIndex: 1, 1.50 + extraDelayedFinishFunction: addRadioGroupSelectListenerAndClick, 1.51 + radioClick: "accept" 1.52 +}, { 1.53 + pageid: PAGEID_LICENSE, 1.54 + extraCheckFunction: checkRadioGroupSelectedIndex, 1.55 + expectedRadioGroupSelectedIndex: 0, 1.56 + buttonClick: "extra1" 1.57 +}, { 1.58 + pageid: PAGEID_FOUND_BILLBOARD, 1.59 + extraCheckFunction: checkRemoteContentState, 1.60 + expectedRemoteContentState: "loaded", 1.61 + buttonClick: "next" 1.62 +}, { 1.63 + pageid: PAGEID_LICENSE, 1.64 + extraCheckFunction: checkRadioGroupSelectedIndex, 1.65 + expectedRadioGroupSelectedIndex: 0, 1.66 + extraDelayedFinishFunction: addRadioGroupSelectListenerAndClick, 1.67 + radioClick: "decline" 1.68 +}, { 1.69 + pageid: PAGEID_LICENSE, 1.70 + extraCheckFunction: checkRadioGroupSelectedIndex, 1.71 + expectedRadioGroupSelectedIndex: 1, 1.72 + extraDelayedFinishFunction: addRadioGroupSelectListenerAndClick, 1.73 + radioClick: "accept" 1.74 +}, { 1.75 + pageid: PAGEID_LICENSE, 1.76 + extraCheckFunction: checkRadioGroupSelectedIndex, 1.77 + expectedRadioGroupSelectedIndex: 0, 1.78 + buttonClick: "next" 1.79 +}, { 1.80 + pageid: PAGEID_DOWNLOADING 1.81 +}, { 1.82 + pageid: PAGEID_FINISHED, 1.83 + buttonClick: "extra1" 1.84 +} ]; 1.85 + 1.86 +function runTest() { 1.87 + debugDump("entering"); 1.88 + 1.89 + let url = URL_HTTP_UPDATE_XML + "?showBillboard=1&showLicense=1" + 1.90 + "&showDetails=1" + getVersionParams(); 1.91 + setUpdateURLOverride(url); 1.92 + 1.93 + gUP.checkForUpdates(); 1.94 +} 1.95 + 1.96 +]]> 1.97 +</script> 1.98 + 1.99 +<body xmlns="http://www.w3.org/1999/xhtml"> 1.100 + <p id="display"></p> 1.101 + <div id="content" style="display: none"></div> 1.102 + <pre id="test"></pre> 1.103 +</body> 1.104 +</window>