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

Side by Side Diff: chrome/browser/history/android/android_provider_backend_unittest.cc

Issue 10868039: Promote BookmarkService to a public API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync. Created 8 years, 3 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
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/history/android/android_provider_backend.h" 5 #include "chrome/browser/history/android/android_provider_backend.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/scoped_temp_dir.h" 12 #include "base/scoped_temp_dir.h"
13 #include "base/stringprintf.h" 13 #include "base/stringprintf.h"
14 #include "base/utf_string_conversions.h" 14 #include "base/utf_string_conversions.h"
15 #include "chrome/browser/api/bookmarks/bookmark_service.h"
15 #include "chrome/browser/bookmarks/bookmark_model.h" 16 #include "chrome/browser/bookmarks/bookmark_model.h"
16 #include "chrome/browser/bookmarks/bookmark_model_factory.h" 17 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
17 #include "chrome/browser/bookmarks/bookmark_service.h"
18 #include "chrome/browser/history/android/android_time.h" 18 #include "chrome/browser/history/android/android_time.h"
19 #include "chrome/browser/history/history_backend.h" 19 #include "chrome/browser/history/history_backend.h"
20 #include "chrome/browser/profiles/profile_manager.h" 20 #include "chrome/browser/profiles/profile_manager.h"
21 #include "chrome/common/chrome_constants.h" 21 #include "chrome/common/chrome_constants.h"
22 #include "chrome/common/chrome_notification_types.h" 22 #include "chrome/common/chrome_notification_types.h"
23 #include "chrome/test/base/testing_browser_process.h" 23 #include "chrome/test/base/testing_browser_process.h"
24 #include "chrome/test/base/testing_profile.h"
24 #include "chrome/test/base/testing_profile_manager.h" 25 #include "chrome/test/base/testing_profile_manager.h"
25 #include "chrome/test/base/testing_profile.h"
26 #include "chrome/test/base/ui_test_utils.h" 26 #include "chrome/test/base/ui_test_utils.h"
27 #include "content/public/browser/browser_thread.h" 27 #include "content/public/browser/browser_thread.h"
28 #include "content/public/test/test_browser_thread.h" 28 #include "content/public/test/test_browser_thread.h"
29 #include "testing/gtest/include/gtest/gtest.h" 29 #include "testing/gtest/include/gtest/gtest.h"
30 30
31 using base::Time; 31 using base::Time;
32 using base::TimeDelta; 32 using base::TimeDelta;
33 using content::BrowserThread; 33 using content::BrowserThread;
34 34
35 namespace history { 35 namespace history {
(...skipping 1718 matching lines...) Expand 10 before | Expand all | Expand 10 after
1754 // Query by folder=1, the row2 should returned. 1754 // Query by folder=1, the row2 should returned.
1755 statement.reset(backend->QueryHistoryAndBookmarks( 1755 statement.reset(backend->QueryHistoryAndBookmarks(
1756 projections, std::string("folder=1"), std::vector<string16>(), 1756 projections, std::string("folder=1"), std::vector<string16>(),
1757 std::string("url ASC"))); 1757 std::string("url ASC")));
1758 ASSERT_TRUE(statement->statement()->Step()); 1758 ASSERT_TRUE(statement->statement()->Step());
1759 EXPECT_EQ(row2.url(), GURL(statement->statement()->ColumnString(0))); 1759 EXPECT_EQ(row2.url(), GURL(statement->statement()->ColumnString(0)));
1760 EXPECT_FALSE(statement->statement()->Step()); 1760 EXPECT_FALSE(statement->statement()->Step());
1761 } 1761 }
1762 1762
1763 } // namespace history 1763 } // namespace history
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698