Bug 467438: EM tests are touching the network. r=robstrong, CLOSED TREE

This commit is contained in:
Dave Townsend 2008-12-01 18:13:42 -06:00
parent 611df67e19
commit b883bc40e1
2 changed files with 14 additions and 0 deletions

View File

@ -39,6 +39,9 @@
// Disables security checking our updates which haven't been signed
gPrefs.setBoolPref("extensions.checkUpdateSecurity", false);
// Use the internal webserver for regular update pings, will just return an error
gPrefs.setCharPref("extensions.update.url", "http://localhost:4444/");
// Get the HTTP server.
do_import_script("netwerk/test/httpserver/httpd.js");
var testserver;

View File

@ -36,6 +36,12 @@
* ***** END LICENSE BLOCK *****
*/
// Use the internal webserver for regular update pings, will just return an error
gPrefs.setCharPref("extensions.update.url", "http://localhost:4444/");
do_import_script("netwerk/test/httpserver/httpd.js");
var testserver;
// This allows the EM to attempt to display errors to the user without failing
var promptService = {
alert: function(aParent, aDialogTitle, aText) {
@ -232,6 +238,7 @@ var installListener = {
function installNextAddon() {
if (gIndex >= ADDONS.length) {
testserver.stop();
do_test_finished();
return;
}
@ -254,5 +261,9 @@ function run_test() {
gIndex = 0;
do_test_pending();
// Create and configure the HTTP server.
testserver = new nsHttpServer();
testserver.start(4444);
installNextAddon();
}