Bug 1281421 - adjust tests a bit to work with the new FindIterator. r?jaws draft
authorMike de Boer <mdeboer@mozilla.com>
Thu, 28 Jul 2016 12:34:15 +0200
changeset 393738 6d711da024e4dcb77098d4cd3ff8cb193597046b
parent 393737 7f18eb84b8619f06c5773fc53616515c26615508
child 393739 2f005f961add11c8671c078b309ec6d443a9dc0d
push id24401
push usermdeboer@mozilla.com
push dateThu, 28 Jul 2016 10:34:34 +0000
reviewersjaws
bugs1281421
milestone50.0a1
Bug 1281421 - adjust tests a bit to work with the new FindIterator. r?jaws MozReview-Commit-ID: 2teBOPPHgl
toolkit/content/tests/chrome/findbar_window.xul
--- a/toolkit/content/tests/chrome/findbar_window.xul
+++ b/toolkit/content/tests/chrome/findbar_window.xul
@@ -546,19 +546,18 @@
       function assertMatches(aTest, aMatches) {
         is(aMatches[1], String(aTest.current),
           "Currently highlighted match should be at " + aTest.current);
         is(aMatches[2], String(aTest.total),
           "Total amount of matches should be " + aTest.total);
       }
 
       for (let test of tests) {
-        promise = promiseMatchesCountResult();
-        gFindBar.clear();
-        yield promise;
+        gFindBar._findField.select();
+        gFindBar._findField.focus();
 
         promise = promiseMatchesCountResult();
         yield enterStringIntoFindField(test.text, false);
         yield promise;
         let matches = foundMatches.value.match(regex);
         if (!test.total) {
           ok(!matches, "No message should be shown when 0 matches are expected");
         } else {