Lines Matching refs:matches

47 // Adds |count| AutocompleteMatches to |matches|.
51 ACMatches* matches) {
52 ASSERT_TRUE(matches != NULL);
57 matches->empty() ? 1300 : (matches->back().relevance - 100);
60 matches->push_back(match);
79 // Duplicate matches.
105 // Adds |count| AutocompleteMatches to |matches|.
108 ACMatches* matches);
110 // Asserts that |result| has |expected_count| matches matching |expected|.
147 ACMatches* matches) {
151 matches->push_back(match);
209 ACMatches matches;
217 matches.push_back(match);
218 r1.AppendMatches(matches);
252 // Tests that matches are copied correctly from two distinct providers.
277 // Tests that matches with empty destination URLs aren't treated as duplicates
288 ACMatches matches;
289 PopulateAutocompleteMatches(data, arraysize(data), &matches);
290 matches[1].destination_url = GURL();
291 matches[3].destination_url = GURL();
292 matches[4].destination_url = GURL();
295 result.AppendMatches(matches);
333 ACMatches matches;
334 PopulateAutocompleteMatches(data, arraysize(data), &matches);
335 matches[0].destination_url = GURL("http://www.foo.com/s?q=foo");
336 matches[1].destination_url = GURL("http://www.foo.com/s?q=foo2");
337 matches[2].destination_url = GURL("http://www.foo.com/s?q=foo&oq=f");
338 matches[3].destination_url = GURL("http://www.foo.com/s?q=foo&aqs=0");
339 matches[4].destination_url = GURL("http://www.foo.com/");
342 result.AppendMatches(matches);
385 ACMatches matches;
386 PopulateAutocompleteMatches(data, arraysize(data), &matches);
387 matches[0].destination_url = GURL("http://www.foo.com/s?q=foo");
388 matches[1].destination_url = GURL("http://www.foo.com/s?q=foo2");
389 matches[2].destination_url = GURL("http://www.foo.com/s?q=foo&oq=f");
390 matches[3].destination_url = GURL("http://www.foo.com/s?q=foo&aqs=0");
391 matches[4].destination_url = GURL("http://www.foo.com/");
392 matches[5].destination_url = GURL("http://www.foo.com/s?q=foo2&oq=f");
395 result.AppendMatches(matches);
410 EXPECT_EQ(matches[2].destination_url,
414 EXPECT_EQ(matches[3].destination_url,
419 EXPECT_EQ(matches[5].destination_url,
424 // Add some matches.
425 ACMatches matches;
433 PopulateAutocompleteMatchesFromTestData(data, arraysize(data), &matches);
436 matches.back().relevance = 500;
450 result.AppendMatches(matches);
459 // We cannot check relevance scores because the matches are sorted by
471 // Add some matches.
472 ACMatches matches;
481 PopulateAutocompleteMatchesFromTestData(data, arraysize(data), &matches);
496 result.AppendMatches(matches);
532 ACMatches matches;
533 PopulateAutocompleteMatches(data, arraysize(data), &matches);
535 result.AppendMatches(matches);
547 ACMatches matches;
548 PopulateAutocompleteMatches(data, arraysize(data), &matches);
549 matches[0].allowed_to_be_default_match = false;
550 matches[1].allowed_to_be_default_match = false;
552 result.AppendMatches(matches);
580 ACMatches matches;
581 PopulateAutocompleteMatches(data, arraysize(data), &matches);
582 matches[0].inline_autocompletion = base::ASCIIToUTF16("completion");
584 result.AppendMatches(matches);
606 ACMatches matches;
607 PopulateAutocompleteMatches(data, arraysize(data), &matches);
608 matches[0].inline_autocompletion = base::ASCIIToUTF16("completion");
610 result.AppendMatches(matches);
628 ACMatches matches;
629 PopulateAutocompleteMatches(data, arraysize(data), &matches);
630 matches[2].inline_autocompletion = base::ASCIIToUTF16("completion");
632 result.AppendMatches(matches);
644 ACMatches matches;
645 PopulateAutocompleteMatches(data, arraysize(data), &matches);
646 matches[0].allowed_to_be_default_match = false;
647 matches[1].inline_autocompletion = base::ASCIIToUTF16("completion");
649 result.AppendMatches(matches);
665 ACMatches matches;
666 PopulateAutocompleteMatches(data, arraysize(data), &matches);
667 matches[0].inline_autocompletion = base::ASCIIToUTF16("completion");
668 matches[1].allowed_to_be_default_match = false;
670 result.AppendMatches(matches);
689 ACMatches matches;
690 PopulateAutocompleteMatches(data, arraysize(data), &matches);
691 matches[0].inline_autocompletion = base::ASCIIToUTF16("completion");
692 matches[1].allowed_to_be_default_match = false;
693 matches[2].allowed_to_be_default_match = false;
694 matches[3].inline_autocompletion = base::ASCIIToUTF16("completion");
696 result.AppendMatches(matches);
711 ACMatches matches;
712 PopulateAutocompleteMatches(data, arraysize(data), &matches);
713 matches[0].allowed_to_be_default_match = false;
714 matches[1].inline_autocompletion = base::ASCIIToUTF16("completion");
715 matches[2].allowed_to_be_default_match = false;
716 matches[3].inline_autocompletion = base::ASCIIToUTF16("completion");
718 result.AppendMatches(matches);
736 ACMatches matches;
739 PopulateAutocompleteMatchesFromTestData(kVerbatimMatches, 1, &matches);
741 result.AppendMatches(matches);
743 matches.clear();
750 &matches);
751 result.AppendMatches(matches);
753 matches.clear();
757 PopulateAutocompleteMatchesFromTestData(kNonVerbatimMatches, 1, &matches);
760 &matches);
761 result.AppendMatches(matches);
768 ACMatches matches;
770 // Case 1: Top match is a verbatim match followed by only copied matches.
773 &matches);
775 matches[i].from_previous = true;
777 result.AppendMatches(matches);
781 // Case 2: The copied matches are then followed by a non-verbatim match.
782 PopulateAutocompleteMatchesFromTestData(kNonVerbatimMatches, 1, &matches);
783 result.AppendMatches(matches);
787 // Case 3: The copied matches are instead followed by a verbatim match.
788 matches.back().from_previous = true;
789 PopulateAutocompleteMatchesFromTestData(kVerbatimMatches, 1, &matches);
790 result.AppendMatches(matches);
799 ACMatches matches;
800 PopulateAutocompleteMatchesFromTestData(kVerbatimMatches, 1, &matches);
802 result.AppendMatches(matches);
808 ACMatches matches;
810 result.AppendMatches(matches);
816 PopulateAutocompleteMatchesFromTestData(kNonVerbatimMatches, 1, &matches);
817 result.AppendMatches(matches);
820 matches.clear();
823 PopulateAutocompleteMatchesFromTestData(kVerbatimMatches, 1, &matches);
824 result.AppendMatches(matches);
827 matches.clear();
830 PopulateAutocompleteMatchesFromTestData(kVerbatimMatches, 1, &matches);
831 PopulateAutocompleteMatchesFromTestData(kNonVerbatimMatches, 1, &matches);
832 result.AppendMatches(matches);
835 matches.clear();
837 // Case 5: Multiple verbatim matches found in AutocompleteResult.
840 &matches);
841 result.AppendMatches(matches);