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 33223 dde486474a5e
parent 33222 af79aa826c3a
child 33224 4b4bc20aa6de
push id2368
push userclokep@gmail.com
push dateMon, 28 Jan 2019 21:12:50 +0000
treeherdercomm-beta@56d23c07d815 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
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;
 }