Bug 1406581 - Add a short waiting time before basic credit card autofill mochitest initialization. r=lchang draft
authorRay Lin <ralin@mozilla.com>
Tue, 24 Oct 2017 15:55:00 +0800
changeset 685997 045ea736e12a945f630dc34d0f21c67bee67a40c
parent 685069 9056f2ee492fa481aa86146aba236c074628e9fd
child 737268 54716f9c50089b0268b0b2982d8382ac7aca0b6e
push id86062
push userbmo:ralin@mozilla.com
push dateWed, 25 Oct 2017 08:12:16 +0000
reviewerslchang
bugs1406581
milestone58.0a1
Bug 1406581 - Add a short waiting time before basic credit card autofill mochitest initialization. r=lchang MozReview-Commit-ID: 68nQEPPCfdS
browser/extensions/formautofill/test/mochitest/test_basic_creditcard_autocomplete_form.html
browser/extensions/formautofill/test/mochitest/test_clear_form.html
--- a/browser/extensions/formautofill/test/mochitest/test_basic_creditcard_autocomplete_form.html
+++ b/browser/extensions/formautofill/test/mochitest/test_basic_creditcard_autocomplete_form.html
@@ -84,16 +84,22 @@ async function setupFormHistory() {
     {op: "add", fieldname: "cc-exp-year", value: 2023},
   ]);
 }
 
 initPopupListener();
 
 // Form with history only.
 add_task(async function history_only_menu_checking() {
+  // TODO: eliminate the timeout when we're able to indicate the right
+  // timing to start.
+  //
+  // After test process was re-spawning to https scheme. Wait 2 secs
+  // to ensure the environment is ready to do storage setup.
+  await sleep(2000);
   await setupFormHistory();
 
   await setInput("#cc-exp-year", "");
   doKey("down");
   await expectPopup();
   checkMenuEntries(["2023"], false);
 });
 
new file mode 100644