toolkit/mozapps/update/tests/chrome/test_0142_notify_invalidCertAttrs_hasUpdate.xul

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

michael@0 1 <?xml version="1.0"?>
michael@0 2 <!--
michael@0 3 /* Any copyright is dedicated to the Public Domain.
michael@0 4 * http://creativecommons.org/publicdomain/zero/1.0/
michael@0 5 */
michael@0 6 -->
michael@0 7
michael@0 8 <?xml-stylesheet href="chrome://global/skin" type="text/css"?>
michael@0 9 <?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
michael@0 10
michael@0 11 <window title="Test notification with invalid certificate attribute name with no update"
michael@0 12 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
michael@0 13 onload="runTestDefault();">
michael@0 14 <script type="application/javascript"
michael@0 15 src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
michael@0 16 <script type="application/javascript"
michael@0 17 src="utils.js"/>
michael@0 18
michael@0 19 <script type="application/javascript">
michael@0 20 <![CDATA[
michael@0 21
michael@0 22 const TESTS = [ {
michael@0 23 pageid: PAGEID_ERROR_EXTRA,
michael@0 24 extraDelayedCheckFunction: checkErrorExtraPage,
michael@0 25 shouldBeHidden: true,
michael@0 26 displayedTextElem: "errorCertAttrHasUpdateLabel",
michael@0 27 buttonClick: "finish"
michael@0 28 } ];
michael@0 29
michael@0 30 function runTest() {
michael@0 31 debugDump("entering");
michael@0 32
michael@0 33 Services.prefs.setCharPref(PREF_APP_UPDATE_CERT_INVALID_ATTR_NAME,
michael@0 34 "Invalid Attribute Name");
michael@0 35 Services.prefs.setBoolPref(PREF_APP_UPDATE_CERT_REQUIREBUILTIN, false);
michael@0 36 Services.prefs.setBoolPref(PREF_APP_UPDATE_CERT_CHECKATTRS, true);
michael@0 37
michael@0 38 let url = URL_HTTPS_UPDATE_XML + "?showDetails=1" + getVersionParams();
michael@0 39 gAppUpdateURLDefault = gDefaultPrefBranch.getCharPref(PREF_APP_UPDATE_URL);
michael@0 40 debugDump("setting default pref " + PREF_APP_UPDATE_URL + " to " + url);
michael@0 41 gDefaultPrefBranch.setCharPref(PREF_APP_UPDATE_URL, url);
michael@0 42
michael@0 43 errorsPrefObserver.init(PREF_APP_UPDATE_CERT_ERRORS,
michael@0 44 PREF_APP_UPDATE_CERT_MAXERRORS);
michael@0 45
michael@0 46 gAUS.notify(null);
michael@0 47 }
michael@0 48
michael@0 49 ]]>
michael@0 50 </script>
michael@0 51
michael@0 52 <body xmlns="http://www.w3.org/1999/xhtml">
michael@0 53 <p id="display"></p>
michael@0 54 <div id="content" style="display: none"></div>
michael@0 55 <pre id="test"></pre>
michael@0 56 </body>
michael@0 57 </window>

mercurial