Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(602)

Side by Side Diff: chrome/browser/bookmarks/bookmark_index_unittest.cc

Issue 12310049: bookmarks: Remove in_memory_database.h include, it's unused. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/bookmarks/DEPS ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/bookmarks/bookmark_index.h"
6
5 #include <string> 7 #include <string>
6 #include <vector> 8 #include <vector>
7 9
8 #include "base/message_loop.h" 10 #include "base/message_loop.h"
9 #include "base/string_split.h" 11 #include "base/string_split.h"
10 #include "base/string_util.h" 12 #include "base/string_util.h"
11 #include "base/strings/string_number_conversions.h" 13 #include "base/strings/string_number_conversions.h"
12 #include "base/utf_string_conversions.h" 14 #include "base/utf_string_conversions.h"
13 #include "chrome/browser/bookmarks/bookmark_index.h"
14 #include "chrome/browser/bookmarks/bookmark_model.h" 15 #include "chrome/browser/bookmarks/bookmark_model.h"
15 #include "chrome/browser/bookmarks/bookmark_model_factory.h" 16 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
16 #include "chrome/browser/bookmarks/bookmark_utils.h" 17 #include "chrome/browser/bookmarks/bookmark_utils.h"
17 #include "chrome/browser/history/history_service.h" 18 #include "chrome/browser/history/history_service.h"
18 #include "chrome/browser/history/history_service_factory.h" 19 #include "chrome/browser/history/history_service_factory.h"
19 #include "chrome/browser/history/in_memory_database.h"
20 #include "chrome/browser/history/url_database.h" 20 #include "chrome/browser/history/url_database.h"
21 #include "chrome/test/base/testing_profile.h" 21 #include "chrome/test/base/testing_profile.h"
22 #include "content/public/test/test_browser_thread.h" 22 #include "content/public/test/test_browser_thread.h"
23 #include "testing/gtest/include/gtest/gtest.h" 23 #include "testing/gtest/include/gtest/gtest.h"
24 24
25 using content::BrowserThread; 25 using content::BrowserThread;
26 26
27 class BookmarkIndexTest : public testing::Test { 27 class BookmarkIndexTest : public testing::Test {
28 public: 28 public:
29 BookmarkIndexTest() : model_(new BookmarkModel(NULL)) {} 29 BookmarkIndexTest() : model_(new BookmarkModel(NULL)) {}
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 EXPECT_EQ(data[1].url, matches[3].node->url()); 305 EXPECT_EQ(data[1].url, matches[3].node->url());
306 306
307 matches.clear(); 307 matches.clear();
308 // Select top two matches. 308 // Select top two matches.
309 model->GetBookmarksWithTitlesMatching(ASCIIToUTF16("google"), 2, &matches); 309 model->GetBookmarksWithTitlesMatching(ASCIIToUTF16("google"), 2, &matches);
310 310
311 EXPECT_EQ(2, static_cast<int>(matches.size())); 311 EXPECT_EQ(2, static_cast<int>(matches.size()));
312 EXPECT_EQ(data[0].url, matches[0].node->url()); 312 EXPECT_EQ(data[0].url, matches[0].node->url());
313 EXPECT_EQ(data[3].url, matches[1].node->url()); 313 EXPECT_EQ(data[3].url, matches[1].node->url());
314 } 314 }
OLDNEW
« no previous file with comments | « chrome/browser/bookmarks/DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698