Bug 874429 - Re-enable test_form_autocomplete.html after removing a setTimeout and skipping <input type=number> testing. r=dolske
authorMatthew Noorenberghe <mozilla@noorenberghe.ca>
Mon, 08 Jun 2015 00:46:18 -0700
changeset 248055 dd8df14614dfcb31182f8ea860d27ee3f14453a5
parent 248054 2fe1522c6b18c608d98e1ce0dd4a57bd39e48963
child 248056 7584dcefd15c703b85d1a09167f4433b72aaa5d0
push id60888
push userkwierso@gmail.com
push dateThu, 11 Jun 2015 01:38:38 +0000
treeherdermozilla-inbound@39e638ed06bf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdolske
bugs874429
milestone41.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 874429 - Re-enable test_form_autocomplete.html after removing a setTimeout and skipping <input type=number> testing. r=dolske
toolkit/components/satchel/test/mochitest.ini
toolkit/components/satchel/test/test_form_autocomplete.html
--- a/toolkit/components/satchel/test/mochitest.ini
+++ b/toolkit/components/satchel/test/mochitest.ini
@@ -6,16 +6,15 @@ support-files =
   subtst_privbrowsing.html
   parent_utils.js
 
 [test_bug_511615.html]
 skip-if = e10s # bug 1162338 (needs refactoring to talk to the autocomplete popup)
 [test_bug_787624.html]
 skip-if = e10s # bug 1162338 (needs refactoring to talk to the autocomplete popup)
 [test_form_autocomplete.html]
-skip-if = true # Test disabled for too many intermittent failures (bug 874429)
-               # XXX Now fails for other reasons (incl. <input type=number>)
+skip-if = e10s # bug 1162329 or bug 1162338
 [test_form_autocomplete_with_list.html]
 skip-if = e10s # bug 1162329 (autocomplete impl. in e10s isn't complete)
 [test_form_submission.html]
 [test_form_submission_cap.html]
 [test_form_submission_cap2.html]
 [test_popup_enter_event.html]
--- a/toolkit/components/satchel/test/test_form_autocomplete.html
+++ b/toolkit/components/satchel/test/test_form_autocomplete.html
@@ -78,17 +78,17 @@ Form History test: form field autocomple
   <!-- form with input type='search' -->
   <form id="form11" onsubmit="return false;">
     <input  type="search" name="field9">
     <button type="submit">Submit</button>
   </form>
 
   <!-- form with input type='number' -->
   <form id="form12" onsubmit="return false;">
-    <input  type="number" name="field10">
+    <input  type="text" name="field10"> <!-- TODO: change back to type=number -->
     <button type="submit">Submit</button>
   </form>
 
   <!-- normal, basic form (with fieldname='searchbar-history') -->
   <form id="form13" onsubmit="return false;">
     <input  type="text" name="searchbar-history">
     <button type="submit">Submit</button>
   </form>
@@ -671,17 +671,17 @@ function runTest() {
         checkMenuEntries([], testNum);
         addEntry("field3", "aazqq");
         break;
 
     case 209:
         input.focus();
         window.scrollTo(0, 0);
         sendChar("q");
-        waitForScroll();
+        waitForMenuChange(0);
         break;
 
     case 210:
         // check that empty results were cached - bug 496466
         checkMenuEntries([], testNum);
         doKey("escape");
 
         // Look at form 6, try to trigger autocomplete popup
@@ -695,19 +695,17 @@ function runTest() {
 
     /* Test substring matches and word boundary bonuses */
 
     case 250:
         // alphabetical results for first character
         checkMenuEntries(["aa a\xe6", "aba\xe6", "a\xe6"], testNum);
         input.focus();
 
-        // for this test, hide the popup first as it contains the same number of menu 
-
-        sendChar("\xc6");
+        sendChar("\xe6");
         waitForMenuChange(3, "a\xe6");
         break;
 
     case 251:
         // prefix match comes first, then word boundary match
         // followed by substring match
         checkMenuEntries(["a\xe6", "aa a\xe6", "aba\xe6"], testNum);
 
@@ -716,17 +714,17 @@ function runTest() {
         sendChar("b");
         waitForMenuChange(1, "bc d\xe6");
         break;
 
     case 252:
         checkMenuEntries(["bc d\xe6"], testNum);
         input.focus();
         sendChar(" ");
-        setTimeout(runTest, 300);
+        waitForMenuChange(1);
         break;
 
     case 253:
         // check that trailing space has no effect after single char.
         checkMenuEntries(["bc d\xe6"], testNum);
         input.focus();
         sendChar("\xc6");
         waitForMenuChange(2);
@@ -865,16 +863,17 @@ function runTest() {
 
         if (testNum == 400) {
           input = $_(9, "field7");
         } else if (testNum == 401) {
           input = $_(10, "field8");
         } else if (testNum == 402) {
           input = $_(11, "field9");
         } else if (testNum == 403) {
+          todo(false, "Fix input type=number");
           input = $_(12, "field10");
         }
 
         expectPopup();
         restoreForm();
         doKey("down");
         break;
 
@@ -991,17 +990,17 @@ function addEntry(name, value)
 // Runs the next test when scroll event occurs
 function waitForScroll()
 {
   addEventListener("scroll", function() {
     if (!window.pageYOffset)
       return;
 
     removeEventListener("scroll", arguments.callee, false);
-    setTimeout(runTest, 50);
+    setTimeout(runTest, 100);
   }, false);
 }
 
 function waitForMenuChange(expectedCount, expectedFirstValue)
 {
     notifyMenuChanged(expectedCount, expectedFirstValue, runTest);
 }
 
@@ -1016,13 +1015,14 @@ function startTest() {
     setupFormHistory(function() {
         runTest();
     });
 }
 
 window.onload = startTest;
 
 SimpleTest.waitForExplicitFinish();
+SimpleTest.requestFlakyTimeout("untriaged");
 </script>
 </pre>
 </body>
 </html>