• Home
  • Raw
  • Download

Lines Matching refs:matches

53     std::vector<bookmark_utils::TitleMatch> matches;  in ExpectMatches()  local
54 model_->GetBookmarksWithTitlesMatching(ASCIIToUTF16(query), 1000, &matches); in ExpectMatches()
55 ASSERT_EQ(expected_titles.size(), matches.size()); in ExpectMatches()
58 for (size_t j = 0; j < matches.size(); ++j) { in ExpectMatches()
59 if (ASCIIToUTF16(expected_titles[i]) == matches[j].node->GetTitle()) { in ExpectMatches()
60 matches.erase(matches.begin() + j); in ExpectMatches()
70 Snippet::MatchPositions* matches) { in ExtractMatchPositions() argument
77 matches->push_back(Snippet::MatchPosition()); in ExtractMatchPositions()
81 matches->back().first = chunks0; in ExtractMatchPositions()
82 matches->back().second = chunks1; in ExtractMatchPositions()
88 std::vector<bookmark_utils::TitleMatch> matches; in ExpectMatchPositions() local
89 model_->GetBookmarksWithTitlesMatching(ASCIIToUTF16(query), 1000, &matches); in ExpectMatchPositions()
90 ASSERT_EQ(1U, matches.size()); in ExpectMatchPositions()
91 const bookmark_utils::TitleMatch& match = matches[0]; in ExpectMatchPositions()
203 std::vector<bookmark_utils::TitleMatch> matches; in TEST_F() local
204 model_->GetBookmarksWithTitlesMatching(ASCIIToUTF16("ABc"), 1, &matches); in TEST_F()
205 EXPECT_EQ(1U, matches.size()); in TEST_F()
215 std::vector<bookmark_utils::TitleMatch> matches; in TEST_F() local
216 model_->GetBookmarksWithTitlesMatching(ASCIIToUTF16("i"), 100, &matches); in TEST_F()
217 ASSERT_EQ(1U, matches.size()); in TEST_F()
218 EXPECT_TRUE(matches[0].node == n1); in TEST_F()
219 EXPECT_TRUE(matches[0].match_positions.empty()); in TEST_F()
282 std::vector<bookmark_utils::TitleMatch> matches; in TEST_F() local
283 model->GetBookmarksWithTitlesMatching(ASCIIToUTF16("google"), 4, &matches); in TEST_F()
290 EXPECT_EQ(4, static_cast<int>(matches.size())); in TEST_F()
291 EXPECT_EQ(data[0].url, matches[0].node->GetURL()); in TEST_F()
292 EXPECT_EQ(data[3].url, matches[1].node->GetURL()); in TEST_F()
293 EXPECT_EQ(data[2].url, matches[2].node->GetURL()); in TEST_F()
294 EXPECT_EQ(data[1].url, matches[3].node->GetURL()); in TEST_F()
296 matches.clear(); in TEST_F()
298 model->GetBookmarksWithTitlesMatching(ASCIIToUTF16("google"), 2, &matches); in TEST_F()
300 EXPECT_EQ(2, static_cast<int>(matches.size())); in TEST_F()
301 EXPECT_EQ(data[0].url, matches[0].node->GetURL()); in TEST_F()
302 EXPECT_EQ(data[3].url, matches[1].node->GetURL()); in TEST_F()