Home | History | Annotate | Download | only in bookmarks

Lines Matching refs:matches

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