Bug 1516617 - Add waiting for L10n to open_about_support(). r=darktrojan DONTBUILD
authorJorg K <jorgk@jorgk.com>
Sat, 29 Dec 2018 10:37:43 +0100
changeset 34077 dde486474a5eb462e8a3c7e935af15edd1e4c9ee
parent 34076 af79aa826c3a692a097ea5b6182e0e7138bf730f
child 34078 4b4bc20aa6deba71751a8e0043d9c07b8faeae00
push id389
push userclokep@gmail.com
push dateMon, 18 Mar 2019 19:01:53 +0000
reviewersdarktrojan
bugs1516617
Bug 1516617 - Add waiting for L10n to open_about_support(). r=darktrojan DONTBUILD
mail/test/mozmill/content-tabs/test-about-support.js
--- a/mail/test/mozmill/content-tabs/test-about-support.js
+++ b/mail/test/mozmill/content-tabs/test-about-support.js
@@ -61,16 +61,22 @@ const ABOUT_SUPPORT_ERROR_STRINGS = new 
 /**
  * Opens about:support and waits for it to load.
  *
  * @returns the about:support tab.
  */
 function open_about_support() {
   let tab = open_content_tab_with_click(mc.menus.helpMenu.aboutsupport_open,
                                         "about:support");
+
+  // Make sure L10n is done.
+  let l10nDone = false;
+  tab.browser.contentDocument.l10n.ready.then(() => l10nDone = true, Cu.reportError);
+  mc.waitFor(() => l10nDone, "Timeout waiting for L10n to complete.");
+
   // We have one variable that's asynchronously populated -- wait for it to be
   // populated.
   mc.waitFor(() => (tab.browser.contentWindow.gAccountDetails !== undefined),
              "Timeout waiting for about:support's gAccountDetails to populate.");
 
   return tab;
 }