Bug 1420695: Don't try to connect to fake ISPs in tests. draft
authorTom Prince <mozilla@hocat.ca>
Sun, 07 Jan 2018 15:09:46 -0700
changeset 23703 954b0c6888ceecf53308286138d6bba3c0ca190e
parent 23698 27191bf09df89656d92f1daba6d9a6e88f398bba
push id200
push userbmo:mozilla@hocat.ca
push dateSun, 07 Jan 2018 22:11:13 +0000
bugs1420695
Bug 1420695: Don't try to connect to fake ISPs in tests. MozReview-Commit-ID: F3D6Zk4JBxH
mail/test/mozmill/account/test-mail-account-setup-wizard.js
--- a/mail/test/mozmill/account/test-mail-account-setup-wizard.js
+++ b/mail/test/mozmill/account/test-mail-account-setup-wizard.js
@@ -150,16 +150,17 @@ function subtest_verify_account(amc) {
  */
 function test_bad_password_uses_old_settings() {
   // Set the pref to load a local autoconfig file, that will fetch the
   // ../account/xml/example.com which contains the settings for the
   // @example.com email account (see the 'user' object).
   let pref_name = "mailnews.auto_config_url";
   let url = collector.addHttpResource("../account/xml", "autoconfig");
   Services.prefs.setCharPref(pref_name, url);
+  Services.prefs.setBoolPref("mailnews.auto_config.fetchFromISP.enabled", false)
 
   // Force .com MIME-Type to text/xml
   collector.httpd.registerContentType("com", "text/xml");
 
   mc.sleep(0);
   open_mail_account_setup_wizard(function (awc) {
     try {
       // Input user's account information
@@ -193,16 +194,17 @@ function test_bad_password_uses_old_sett
       awc.sleep(1000);
       assert_equals(awc.e("outgoing_hostname").value, user.outgoingHost,
                     "Outgoing server changed!");
       assert_equals(awc.e("incoming_hostname").value, user.incomingHost,
                     "incoming server changed!");
     } finally {
       // Clean up
       Services.prefs.clearUserPref(pref_name);
+      Services.prefs.clearUserPref("mailnews.auto_config.fetchFromISP.enabled")
       awc.e("cancel_button").click();
     }
   });
 }
 
 function test_remember_password() {
   remember_password_test(true);
   remember_password_test(false);