Bug 1374523 - [Form Autofill] Increase timer to wait for dropdown rendering and run keyboard test first in browser_autocomplete_footer.js. r=ralin
authorLuke Chang <lchang@mozilla.com>
Thu, 09 Nov 2017 16:29:35 +0800
changeset 444183 8e5b21f2547f7ad3f4fed61e7af2e3c905d13830
parent 444182 ffd79ce93abd8199f4c98540b9cd32c8dc4dfe38
child 444184 33824395a6ca9145c8b8ce474f043081181164d3
push id1618
push userCallek@gmail.com
push dateThu, 11 Jan 2018 17:45:48 +0000
treeherdermozilla-release@882ca853e05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersralin
bugs1374523
milestone58.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1374523 - [Form Autofill] Increase timer to wait for dropdown rendering and run keyboard test first in browser_autocomplete_footer.js. r=ralin MozReview-Commit-ID: EvUZuMx0PPA
browser/extensions/formautofill/test/browser/browser_autocomplete_footer.js
--- a/browser/extensions/formautofill/test/browser/browser_autocomplete_footer.js
+++ b/browser/extensions/formautofill/test/browser/browser_autocomplete_footer.js
@@ -15,37 +15,16 @@ async function expectWarningText(browser
 
 add_task(async function setup_storage() {
   await saveAddress(TEST_ADDRESS_2);
   await saveAddress(TEST_ADDRESS_3);
   await saveAddress(TEST_ADDRESS_4);
   await saveAddress(TEST_ADDRESS_5);
 });
 
-add_task(async function test_click_on_footer() {
-  await BrowserTestUtils.withNewTab({gBrowser, url: URL}, async function(browser) {
-    const {autoCompletePopup: {richlistbox: itemsBox}} = browser;
-
-    await openPopupOn(browser, "#organization");
-    // Click on the footer
-    const optionButton = itemsBox.querySelector(".autocomplete-richlistitem:last-child")._optionButton;
-    const prefTabPromise = BrowserTestUtils.waitForNewTab(gBrowser, PRIVACY_PREF_URL);
-    // Wait for dropdown animation finished to continue mouse synthesizing.
-    await sleep(1000);
-    await EventUtils.synthesizeMouseAtCenter(optionButton, {});
-    info(`expecting tab: about:preferences#privacy opened`);
-    const prefTab = await prefTabPromise;
-    info(`expecting tab: about:preferences#privacy removed`);
-    await BrowserTestUtils.removeTab(prefTab);
-    ok(true, "Tab: preferences#privacy was successfully opened by clicking on the footer");
-
-    await closePopup(browser);
-  });
-});
-
 add_task(async function test_press_enter_on_footer() {
   await BrowserTestUtils.withNewTab({gBrowser, url: URL}, async function(browser) {
     const {autoCompletePopup: {richlistbox: itemsBox}} = browser;
 
     await openPopupOn(browser, "#organization");
     // Navigate to the footer and press enter.
     const listItemElems = itemsBox.querySelectorAll(".autocomplete-richlistitem");
     const prefTabPromise = BrowserTestUtils.waitForNewTab(gBrowser, PRIVACY_PREF_URL);
@@ -58,16 +37,37 @@ add_task(async function test_press_enter
     info(`expecting tab: about:preferences#privacy removed`);
     await BrowserTestUtils.removeTab(prefTab);
     ok(true, "Tab: preferences#privacy was successfully opened by pressing enter on the footer");
 
     await closePopup(browser);
   });
 });
 
+add_task(async function test_click_on_footer() {
+  await BrowserTestUtils.withNewTab({gBrowser, url: URL}, async function(browser) {
+    const {autoCompletePopup: {richlistbox: itemsBox}} = browser;
+
+    await openPopupOn(browser, "#organization");
+    // Click on the footer
+    const optionButton = itemsBox.querySelector(".autocomplete-richlistitem:last-child")._optionButton;
+    const prefTabPromise = BrowserTestUtils.waitForNewTab(gBrowser, PRIVACY_PREF_URL);
+    // Wait for dropdown animation finished to continue mouse synthesizing.
+    await sleep(3000);
+    await EventUtils.synthesizeMouseAtCenter(optionButton, {});
+    info(`expecting tab: about:preferences#privacy opened`);
+    const prefTab = await prefTabPromise;
+    info(`expecting tab: about:preferences#privacy removed`);
+    await BrowserTestUtils.removeTab(prefTab);
+    ok(true, "Tab: preferences#privacy was successfully opened by clicking on the footer");
+
+    await closePopup(browser);
+  });
+});
+
 add_task(async function test_phishing_warning_single_category() {
   await BrowserTestUtils.withNewTab({gBrowser, url: URL}, async function(browser) {
     const {autoCompletePopup: {richlistbox: itemsBox}} = browser;
 
     await openPopupOn(browser, "#tel");
     const warningBox = itemsBox.querySelector(".autocomplete-richlistitem:last-child")._warningTextBox;
     ok(warningBox, "Got phishing warning box");