Bug 1557233 - Backed out changeset 41e1b638798e to re-enable tests. a=backout
authorJorg K <jorgk@jorgk.com>
Thu, 20 Jun 2019 13:04:54 +0200
changeset 35911 61d97e89fc63ed49039409d54da53f9deec9fb5e
parent 35910 a0c3fe6d7d95da44975c72cdad17062dc0eea952
child 35912 fdd1ee5faf324b84805f120eb6fdb1e3a577febe
push id392
push userclokep@gmail.com
push dateMon, 02 Sep 2019 20:17:19 +0000
reviewersbackout
bugs1557233
Bug 1557233 - Backed out changeset 41e1b638798e to re-enable tests. a=backout
mail/test/mozmill/newmailaccount/test-newmailaccount.js
--- a/mail/test/mozmill/newmailaccount/test-newmailaccount.js
+++ b/mail/test/mozmill/newmailaccount/test-newmailaccount.js
@@ -98,17 +98,17 @@ function nAccounts() {
  * this test is split over 3 functions, and uses a global gNumAccounts.  The
  * three functions are "test_get_an_account", "subtest_get_an_account",
  * and "subtest_get_an_account_part_2".
  *
  * @param aCloseAndRestore a boolean for whether or not we should close and
  *                         restore the Account Provisioner tab before filling
  *                         in the form. Defaults to false.
  */
-function disabled_test_get_an_account(aCloseAndRestore) {
+function test_get_an_account(aCloseAndRestore) {
   let originalEngine = Services.search.defaultEngine;
   // Open the provisioner - once opened, let subtest_get_an_account run.
   plan_for_modal_dialog("AccountCreation", subtest_get_an_account);
   open_provisioner_window();
   wait_for_modal_dialog("AccountCreation");
 
   // Once we're here, subtest_get_an_account has completed, and we're waiting
   // for a content tab to load for the account order form.
@@ -208,25 +208,25 @@ function subtest_get_an_account_part_2(w
   // Then click "Finish"
   mc.click(w.eid("closeWindow"));
 }
 
 /**
  * Runs test_get_an_account again, but this time, closes and restores the
  * order form tab before submitting it.
  */
-function disabled_test_restored_ap_tab_works() {
-  // test_get_an_account(true);
+function test_restored_ap_tab_works() {
+  test_get_an_account(true);
 }
 
 /**
  * Test that clicking on the "I think I'll configure my account later"
  * button dismisses the Account Provisioner window.
  */
-function disabled_test_can_dismiss_account_provisioner() {
+function test_can_dismiss_account_provisioner() {
   plan_for_modal_dialog("AccountCreation", subtest_can_dismiss_account_provisioner);
   open_provisioner_window();
   wait_for_modal_dialog("AccountCreation");
 }
 
 /**
  * Subtest for test_can_dismiss_account_provisioner, that runs
  * once the modal dialog has opened.  This function just clicks the
@@ -241,17 +241,17 @@ function subtest_can_dismiss_account_pro
   // Ensure that the window has closed.
   wait_for_window_close();
 }
 
 /**
  * Test that clicking on the "Skip this and use my existing email" button
  * sends us to the existing email account wizard.
  */
-function disabled_test_can_switch_to_existing_email_account_wizard() {
+function test_can_switch_to_existing_email_account_wizard() {
   plan_for_modal_dialog("AccountCreation",
                         subtest_can_switch_to_existing_email_account_wizard);
   open_provisioner_window();
   wait_for_modal_dialog("AccountCreation");
   // Ensure that the existing email account wizard opened.
   let wizard = wait_for_new_window("mail:autoconfig");
 
   // Then close the wizard
@@ -273,17 +273,17 @@ function subtest_can_switch_to_existing_
   // Ensure that the Account Provisioner window closed
   wait_for_window_close();
 }
 
 /**
  * Test that clicking on the "Other languages" div causes account
  * providers with other languages to be displayed.
  */
-function disabled_test_can_display_providers_in_other_languages() {
+function test_can_display_providers_in_other_languages() {
   plan_for_modal_dialog("AccountCreation",
                         subtest_can_display_providers_in_other_languages);
   open_provisioner_window();
   wait_for_modal_dialog("AccountCreation");
 }
 
 /**
  * Subtest for test_can_display_providers_in_other_languages. This function
@@ -305,17 +305,17 @@ function subtest_can_display_providers_i
   wait_for_element_invisible(w, "otherLangDesc");
 }
 
 /**
  * Spawn the provisioner window by clicking on the menuitem,
  * then flip back and forth between that and the existing email
  * wizard, and then test to see if we can dismiss the provisioner.
  */
-function disabled_test_flip_flop_from_provisioner_menuitem() {
+function test_flip_flop_from_provisioner_menuitem() {
   plan_for_modal_dialog("AccountCreation",
                         subtest_flip_flop_from_provisioner_menuitem);
   plan_for_new_window("mail:autoconfig");
   open_provisioner_window();
   plan_for_new_window("mail:autoconfig");
   wait_for_modal_dialog("AccountCreation");
 
   const NUM_OF_FLIP_FLOPS = 3;
@@ -364,17 +364,17 @@ function subtest_close_provisioner(w) {
   // Ensure that the window has closed.
   wait_for_window_close();
 }
 
 /**
  * Test that the name typed into the search field gets persisted after
  * doing a search, or choosing to go to the email setup wizard.
  */
-function disabled_test_persist_name_in_search_field() {
+function test_persist_name_in_search_field() {
   plan_for_modal_dialog("AccountCreation",
                         subtest_persist_name_in_search_field);
   open_provisioner_window();
   wait_for_modal_dialog("AccountCreation");
   plan_for_modal_dialog("AccountCreation",
                         subtest_persist_name_in_search_field_part_2);
   open_provisioner_window();
   wait_for_modal_dialog("AccountCreation");
@@ -411,17 +411,17 @@ function subtest_persist_name_in_search_
 function subtest_persist_name_in_search_field_part_2(w) {
   mc.waitFor(() => w.e("name").value == NAME);
 }
 
 /**
  * Test that names with HTML characters are escaped properly when displayed
  * back to the user.
  */
-function disabled_test_html_characters_and_ampersands() {
+function test_html_characters_and_ampersands() {
   plan_for_modal_dialog("AccountCreation",
                         subtest_html_characters_and_ampersands);
   open_provisioner_window();
   wait_for_modal_dialog("AccountCreation");
 }
 
 /**
  * Subtest used by test_html_characters_and_ampersands.  This function puts
@@ -455,17 +455,17 @@ function subtest_html_characters_and_amp
   assert_true(displayedName.includes("&lt;"),
               "Should have eliminated less-than signs");
 }
 
 /**
  * Test that only the terms of service and privacy links for selected
  * providers are shown in the disclaimer.
  */
-function disabled_test_show_tos_privacy_links_for_selected_providers() {
+function test_show_tos_privacy_links_for_selected_providers() {
   plan_for_modal_dialog("AccountCreation",
                         subtest_show_tos_privacy_links_for_selected_providers);
   open_provisioner_window();
   wait_for_modal_dialog("AccountCreation");
 }
 
 /**
  * Subtest used by test_show_tos_privacy_links_for_selected_providers.  This
@@ -529,17 +529,17 @@ function subtest_show_tos_privacy_links_
   assert_links_not_shown(w, ["http://www.example.com/foo-tos",
                              "http://www.example.com/foo-privacy"]);
 }
 
 /**
  * Test that if the search goes bad on the server-side, that we show an
  * error.
  */
-function disabled_test_shows_error_on_bad_suggest_from_name() {
+function test_shows_error_on_bad_suggest_from_name() {
   let original = Services.prefs.getCharPref(kSuggestFromNamePref);
   Services.prefs.setCharPref(kSuggestFromNamePref, url + "badSuggestFromName");
   plan_for_modal_dialog("AccountCreation",
                         subtest_shows_error_on_bad_suggest_from_name);
   open_provisioner_window();
   wait_for_modal_dialog("AccountCreation");
   Services.prefs.setCharPref(kSuggestFromNamePref, original);
 }
@@ -560,17 +560,17 @@ function subtest_shows_error_on_bad_sugg
 
   mc.waitFor(() => !w.window.document.querySelector("#notifications > .error").hidden);
 }
 
 /**
  * Test that if we get an empty result from the server after a search, that
  * we show an error message.
  */
-function disabled_test_shows_error_on_empty_suggest_from_name() {
+function test_shows_error_on_empty_suggest_from_name() {
   let original = Services.prefs.getCharPref(kSuggestFromNamePref);
   Services.prefs.setCharPref(kSuggestFromNamePref, url + "emptySuggestFromName");
   plan_for_modal_dialog("AccountCreation",
                         subtest_shows_error_on_empty_suggest_from_name);
   open_provisioner_window();
   wait_for_modal_dialog("AccountCreation");
   Services.prefs.setCharPref(kSuggestFromNamePref, original);
 }
@@ -592,17 +592,17 @@ function subtest_shows_error_on_empty_su
   mc.waitFor(() => !w.window.document.querySelector("#notifications > .error").hidden);
 }
 
 /**
  * Tests that if a provider returns broken or erroneous XML back
  * to the user after account registration, that we log the error
  * in the error console.
  */
-function disabled_test_throws_console_error_on_corrupt_XML() {
+function test_throws_console_error_on_corrupt_XML() {
   // Open the provisioner - once opened, let subtest_get_an_account run.
   get_to_order_form("corrupt@corrupt.invalid");
   let tab = mc.tabmail.currentTabInfo;
 
   // Record how many accounts we start with.
   gNumAccounts = nAccounts();
 
   gConsoleListener.reset();
@@ -621,17 +621,17 @@ function disabled_test_throws_console_er
 
   Services.console.unregisterListener(gConsoleListener);
 }
 
 /**
  * Test that if the providerList is invalid or broken JSON, that
  * we "go offline" and display an error message.
  */
-function disabled_test_broken_provider_list_goes_offline() {
+function test_broken_provider_list_goes_offline() {
   let original = Services.prefs.getCharPref(kProviderListPref);
   Services.prefs.setCharPref(kProviderListPref, url + "providerListBad");
 
   plan_for_modal_dialog("AccountCreation",
                         subtest_broken_provider_list_goes_offline);
   open_provisioner_window();
   wait_for_modal_dialog("AccountCreation");
   Services.prefs.setCharPref(kProviderListPref, original);
@@ -644,17 +644,17 @@ function disabled_test_broken_provider_l
 function subtest_broken_provider_list_goes_offline(w) {
   wait_to_be_offline(w);
 }
 
 /**
  * Test that if a provider has not included some of the required fields,
  * then they're not included as a potential provider for the user.
  */
-function disabled_test_incomplete_provider_not_displayed() {
+function test_incomplete_provider_not_displayed() {
   let original = Services.prefs.getCharPref(kProviderListPref);
   Services.prefs.setCharPref(kProviderListPref, url + "providerListIncomplete");
 
   plan_for_modal_dialog("AccountCreation",
                         subtest_incomplete_provider_not_displayed);
   open_provisioner_window();
   wait_for_modal_dialog("AccountCreation");
   Services.prefs.setCharPref(kProviderListPref, original);
@@ -678,17 +678,17 @@ function subtest_incomplete_provider_not
   assert_equals(1, input.length,
                 "The foo provider should have been displayed");
 }
 
 /**
  * Test that if the search text input is empty, or if no providers are selected,
  * that the search submit button is disabled.
  */
-function disabled_test_search_button_disabled_cases() {
+function test_search_button_disabled_cases() {
   plan_for_modal_dialog("AccountCreation",
                         subtest_search_button_disabled_cases);
   open_provisioner_window();
   wait_for_modal_dialog("AccountCreation");
 }
 
 /**
  * Subtest for test_search_button_disabled_cases.  This function ensures that
@@ -759,17 +759,17 @@ function subtest_search_button_disabled_
  * Tests that when we pref off the Account Provisioner, the menuitem for it
  * becomes hidden, and the button to switch to it from the Existing Account
  * wizard also becomes hidden.  Note that this doesn't test explicitly
  * whether or not the Account Provisioner spawns when there are no accounts.
  * The tests in this file will fail if the Account Provisioner does not spawn
  * with no accounts, and when preffed off, if the Account Provisioner does
  * spawn (which it shouldn't), the instrumentation Mozmill test should fail.
  */
-function disabled_test_can_pref_off_account_provisioner() {
+function test_can_pref_off_account_provisioner() {
   // First, we'll disable the account provisioner.
   Services.prefs.setBoolPref("mail.provider.enabled", false);
 
   // We'll use the Mozmill Menu API to grab the main menu...
   let mailMenuBar = mc.getMenu("#mail-menubar");
   let newMenuPopup = mc.eid("menu_NewPopup");
   let newMailAccountMenuitem = mc.eid("newMailAccountMenuItem");
 
@@ -830,24 +830,24 @@ function disabled_test_can_pref_off_acco
   // Alright, close up.
   close_window(wizard);
 
   // And finally restore the menu to the way it was.
   newMenuPopup.getNode().allowevents = oldAllowEvents;
 }
 
 // We cannot control menus via Mozmill in OSX, so we'll skip this test.
-// test_can_pref_off_account_provisioner.EXCLUDED_PLATFORMS = ["darwin"];
+test_can_pref_off_account_provisioner.EXCLUDED_PLATFORMS = ["darwin"];
 
 /**
  * Tests that if we load a provider list that does not include providers in
  * other languages, then the "show me providers in other languages" link is
  * hidden.
  */
-function disabled_test_other_lang_link_hides() {
+function test_other_lang_link_hides() {
   let original = Services.prefs.getCharPref(kProviderListPref);
   Services.prefs.setCharPref(kProviderListPref, url + "providerListNoOtherLangs");
 
   plan_for_modal_dialog("AccountCreation",
                         subtest_other_lang_link_hides);
   open_provisioner_window();
   wait_for_modal_dialog("AccountCreation");
   Services.prefs.setCharPref(kProviderListPref, original);
@@ -924,17 +924,17 @@ function close_dialog_immediately(aContr
   mc.click(new elib.Elem(aController.window.document.querySelector(".close")));
   wait_for_window_close();
 }
 
 /**
  * Test that clicking on links in the order form open in the same account
  * provisioner tab.
  */
-function disabled_test_internal_link_opening_behaviour() {
+function test_internal_link_opening_behaviour() {
   get_to_order_form();
 
   // Open the provisioner - once opened, let subtest_get_an_account run...
   let tab = mc.tabmail.currentTabInfo;
   let doc = tab.browser.contentWindow.document;
 
   // Click on the internal link.
   mc.click(new elib.Elem(doc.getElementById("internal")));
@@ -945,17 +945,17 @@ function disabled_test_internal_link_ope
   });
   // Now close the tab.
   mc.tabmail.closeTab(tab);
 }
 
 /**
  * Test that window.open in the order form opens in new content tabs.
  */
-function disabled_test_window_open_link_opening_behaviour() {
+function test_window_open_link_opening_behaviour() {
   get_to_order_form();
 
   let tab = mc.tabmail.currentTabInfo;
   let doc = tab.browser.contentWindow.document;
 
   // First, click on the Javascript link - this should open in a new content
   // tab and be focused.
   let newTabLink = doc.getElementById("newtab");
@@ -967,17 +967,17 @@ function disabled_test_window_open_link_
   let newTab = mc.tabmail.currentTabInfo;
   mc.tabmail.closeTab(newTab);
   mc.tabmail.closeTab(tab);
 }
 
 /**
  * Test that links with target="_blank" open in the default browser.
  */
-function disabled_test_external_link_opening_behaviour() {
+function test_external_link_opening_behaviour() {
   get_to_order_form();
 
   let tab = mc.tabmail.currentTabInfo;
   let doc = tab.browser.contentWindow.document;
 
   // Mock out the ExternalProtocolService.
   gMockExtProtSvcReg.register();
 
@@ -991,17 +991,17 @@ function disabled_test_external_link_ope
   gMockExtProtSvcReg.unregister();
   mc.tabmail.closeTab(tab);
 }
 
 /**
  * Test that if the provider returns XML that we can't turn into an account,
  * then we error out and go back to the Account Provisioner dialog.
  */
-function disabled_test_return_to_provisioner_on_error_XML() {
+function test_return_to_provisioner_on_error_XML() {
   const kOriginalTabNum = mc.tabmail.tabContainer.childNodes.length;
 
   get_to_order_form("error@error.invalid");
 
   let tab = mc.tabmail.currentTabInfo;
 
   plan_for_modal_dialog("AccountCreation", close_dialog_immediately);
 
@@ -1018,17 +1018,17 @@ function disabled_test_return_to_provisi
                 "Timed out waiting for the order form tab to close.");
 }
 
 /**
  * Test that if we initiate a search, then the search input, the search button,
  * and all checkboxes should be disabled. The ability to close the window should
  * still be enabled though.
  */
-function disabled_test_disabled_fields_when_searching() {
+function test_disabled_fields_when_searching() {
   plan_for_modal_dialog("AccountCreation",
                         subtest_disabled_fields_when_searching);
   open_provisioner_window();
   wait_for_modal_dialog("AccountCreation");
 }
 
 /**
  * Subtest for test_disabled_fields_when_searching. Sets up a fake HTTP server
@@ -1120,17 +1120,17 @@ function subtest_disabled_fields_when_se
 
   close_dialog_immediately(aController);
 }
 
 /**
  * Tests that the search button is disabled if there is no initially
  * supported language for the user.
  */
-function disabled_test_search_button_disabled_if_no_lang_support() {
+function test_search_button_disabled_if_no_lang_support() {
   // Set the user's supported language to something ridiculous (caching the
   // old one so we can put it back later).
   let originalReqLocales = Services.locale.requestedLocales;
   Services.locale.requestedLocales = ["foo"];
 
   plan_for_modal_dialog("AccountCreation", function(aController) {
     wait_for_provider_list_loaded(aController);
     // The search button should be disabled.
@@ -1161,17 +1161,17 @@ function subtest_search_button_enabled_s
   close_dialog_immediately(aController);
 }
 
 /**
  * Test that if the providerList contains entries with supported languages
  * including "*", they are always displayed, even if the users locale pref
  * is not set to "*".
  */
-function disabled_test_provider_language_wildcard() {
+function test_provider_language_wildcard() {
   let originalReqLocales = Services.locale.requestedLocales;
   Services.locale.requestedLocales = ["foo-ba"];
 
   let original = Services.prefs.getCharPref(kProviderListPref);
   Services.prefs.setCharPref(kProviderListPref, url + "providerListWildcard");
 
   plan_for_modal_dialog("AccountCreation",
                         subtest_provider_language_wildcard);
@@ -1196,17 +1196,17 @@ function subtest_provider_language_wildc
   wait_for_element_invisible(aController, "german-check");
   close_dialog_immediately(aController);
 }
 
 /**
  * Tests that the search button is disabled if we start up the Account
  * Provisioner, and we have no search in the input.
  */
-function disabled_test_search_button_disabled_if_no_query_on_init() {
+function test_search_button_disabled_if_no_query_on_init() {
   // We have to do a little bit of gymnastics to access the local storage
   // for the accountProvisioner dialog...
   let url = "https://accountprovisioner.thunderbird.invalid";
   let dsm = Services.domStorageManager;
 
   let uri = Services.io.newURI(url);
   let principal = Services.scriptSecurityManager.createCodebasePrincipal(uri, {});
   let storage = dsm.createStorage(null, principal, principal, url);
@@ -1220,17 +1220,17 @@ function disabled_test_search_button_dis
   wait_for_modal_dialog("AccountCreation");
 }
 
 /**
  * Test that if we try to open the Account Provisioner dialog when an
  * Account Provisioner tab is opened, that we focus the tab instead of opening
  * the dialog.
  */
-function disabled_test_get_new_account_focuses_existing_ap_tab() {
+function test_get_new_account_focuses_existing_ap_tab() {
   get_to_order_form("green@example.com");
   let apTab = mc.tabmail.getTabInfoForCurrentOrFirstModeInstance(
     mc.tabmail.tabModes.accountProvisionerTab);
 
   // Switch back to the inbox tab.
   mc.tabmail.switchToTab(0);
 
   // Try to re-open the provisioner dialog
@@ -1255,17 +1255,17 @@ function disabled_test_get_new_account_f
   // being opened, which is what we wanted..
   assert_selected_tab(apTab);
   mc.tabmail.closeTab(apTab);
 }
 
 /**
  * Test that some prices can be per-address, instead of per-provider.
  */
-function disabled_test_per_address_prices() {
+function test_per_address_prices() {
   plan_for_modal_dialog("AccountCreation", subtest_per_address_prices);
   open_provisioner_window();
   wait_for_modal_dialog("AccountCreation");
 }
 
 /**
  * Subtest used by test_html_characters_and_ampersands.  This function puts
  * a name with HTML tags into the search input, does a search, and ensures