Software Update:HowToTestMajorUpdateUI: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(How To Test the Major Update UI)
 
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
Here's the quick and dirty way to test Major Update UI, specifically the detailsURL attribute and the licenseURL attributes (specified at [[Software_Update:updates.xml_Format]]).
Here's the quick and dirty way to test Major Update UI, specifically the detailsURL attribute and the licenseURL attributes (specified at [[Software_Update:updates.xml_Format]]).


== create a "fake" updates.xml file on your local machine ==
== Step 1:  create a "fake" updates.xml file on your local machine ==


A "fake" updates.xml file looks like this:
A "fake" updates.xml file looks like this:
Line 14: Line 14:
</pre>
</pre>


note, https://bugzilla.mozilla.org/attachment.cgi?id=242833 is a special, 54 byte, empty mar that does nothing to your build if you install it.  So use this when testing the UI.
'''Important Note'''  https://bugzilla.mozilla.org/attachment.cgi?id=242833 is a special, 54 byte, empty mar that does nothing to your build if you install it.  So use this when testing the UI.


note:  your licenseURL and detailsURL need to be on a website, and can not be file:// urls.
'''Important Note''' the update licenseURL and detailsURL attributes and the patch URL attribute need to be http:// or https:// urls, and can not be file:// urls.


== configure your prefs to point at the "fake" update.xml file ==
== Step 2: configure your prefs to point at the "fake" update.xml file ==


use about:config and set the app.update.url.override pref to your file, for example file:///C:/Documents%20and%20Settings/mozilla/Desktop/update.xml
use about:config and create a string pref named app.update.url.override and set the value to the file url for "fake" update.xml file, for example file:///C:/Documents%20and%20Settings/mozilla/Desktop/update.xml


== check for updates ==
== Step 3: check for updates ==


Use "Help | Check for Updates..." and you should get the Major Update UI for this "fake" update that you created.
Use "Help | Check for Updates..." and you should get the Major Update UI for this "fake" update that you created.
== Step 4: make sure your content works ==
For security concerns, the web pages pointed to by the licenseURL and detailsURL attributes will be unable to execute Javascript, prompt for auth, execute plugins, or have subframes. (Meta redirects and images are allowed.) Additionally, any links in the page should have target=_blank, so that they will be parented in a new browser window, and not in XUL browser with in the software update UI.

Latest revision as of 04:16, 9 March 2010

Here's the quick and dirty way to test Major Update UI, specifically the detailsURL attribute and the licenseURL attributes (specified at Software_Update:updates.xml_Format).

Step 1: create a "fake" updates.xml file on your local machine

A "fake" updates.xml file looks like this:

<?xml version="1.0"?>
<updates>
  <update type="major" version="3.0" extensionVersion="3.0" buildID="2006030713" licenseURL="http://www.mozilla.com/test/sample-eula.html" detailsURL="http://www.mozilla.com/test/sample-details.html">
    <patch type="complete" URL="https://bugzilla.mozilla.org/attachment.cgi?id=242833" hashFunction="SHA1" hashValue="a3ab33bc0dcabd86050013826da8e3a11ab691b2" size="54"/>
  </update>
</updates>

Important Note https://bugzilla.mozilla.org/attachment.cgi?id=242833 is a special, 54 byte, empty mar that does nothing to your build if you install it. So use this when testing the UI.

Important Note the update licenseURL and detailsURL attributes and the patch URL attribute need to be http:// or https:// urls, and can not be file:// urls.

Step 2: configure your prefs to point at the "fake" update.xml file

use about:config and create a string pref named app.update.url.override and set the value to the file url for "fake" update.xml file, for example file:///C:/Documents%20and%20Settings/mozilla/Desktop/update.xml

Step 3: check for updates

Use "Help | Check for Updates..." and you should get the Major Update UI for this "fake" update that you created.

Step 4: make sure your content works

For security concerns, the web pages pointed to by the licenseURL and detailsURL attributes will be unable to execute Javascript, prompt for auth, execute plugins, or have subframes. (Meta redirects and images are allowed.) Additionally, any links in the page should have target=_blank, so that they will be parented in a new browser window, and not in XUL browser with in the software update UI.