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

Side by Side Diff: chrome/browser/sync/profile_sync_test_util.h

Issue 661410: Improve autofill unit test (Closed)
Patch Set: Remove TODO. Created 10 years, 9 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
« no previous file with comments | « chrome/browser/sync/profile_sync_service_autofill_unittest.cc ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #ifndef CHROME_BROWSER_SYNC_PROFILE_SYNC_TEST_UTIL_H_ 5 #ifndef CHROME_BROWSER_SYNC_PROFILE_SYNC_TEST_UTIL_H_
6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_TEST_UTIL_H_ 6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_TEST_UTIL_H_
7 7
8 #include "chrome/browser/webdata/web_database.h" 8 #include "chrome/browser/webdata/web_database.h"
9 #include "chrome/browser/sync/glue/bookmark_change_processor.h" 9 #include "chrome/browser/sync/glue/bookmark_change_processor.h"
10 #include "chrome/browser/sync/glue/bookmark_data_type_controller.h" 10 #include "chrome/browser/sync/glue/bookmark_data_type_controller.h"
(...skipping 14 matching lines...) Expand all
25 25
26 template <class ModelAssociatorImpl> 26 template <class ModelAssociatorImpl>
27 class TestModelAssociator : public ModelAssociatorImpl { 27 class TestModelAssociator : public ModelAssociatorImpl {
28 public: 28 public:
29 explicit TestModelAssociator( 29 explicit TestModelAssociator(
30 ProfileSyncService* service, 30 ProfileSyncService* service,
31 browser_sync::UnrecoverableErrorHandler* error_handler) 31 browser_sync::UnrecoverableErrorHandler* error_handler)
32 : ModelAssociatorImpl(service, error_handler) { 32 : ModelAssociatorImpl(service, error_handler) {
33 } 33 }
34 34
35 TestModelAssociator(ProfileSyncService* service,
36 WebDatabase* web_database,
37 browser_sync::UnrecoverableErrorHandler* error_handler)
38 : ModelAssociatorImpl(service, web_database, error_handler) {
39 }
40
41 virtual bool GetSyncIdForTaggedNode(const std::string& tag, int64* sync_id) { 35 virtual bool GetSyncIdForTaggedNode(const std::string& tag, int64* sync_id) {
42 std::wstring tag_wide; 36 std::wstring tag_wide;
43 if (!UTF8ToWide(tag.c_str(), tag.length(), &tag_wide)) { 37 if (!UTF8ToWide(tag.c_str(), tag.length(), &tag_wide)) {
44 NOTREACHED() << "Unable to convert UTF8 to wide for string: " << tag; 38 NOTREACHED() << "Unable to convert UTF8 to wide for string: " << tag;
45 return false; 39 return false;
46 } 40 }
47 41
48 sync_api::WriteTransaction trans( 42 sync_api::WriteTransaction trans(
49 ModelAssociatorImpl::sync_service()->backend()->GetUserShareHandle()); 43 ModelAssociatorImpl::sync_service()->backend()->GetUserShareHandle());
50 sync_api::ReadNode root(&trans); 44 sync_api::ReadNode root(&trans);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 77
84 ~TestModelAssociator() {} 78 ~TestModelAssociator() {}
85 }; 79 };
86 80
87 class ProfileSyncServiceObserverMock : public ProfileSyncServiceObserver { 81 class ProfileSyncServiceObserverMock : public ProfileSyncServiceObserver {
88 public: 82 public:
89 MOCK_METHOD0(OnStateChanged, void()); 83 MOCK_METHOD0(OnStateChanged, void());
90 }; 84 };
91 85
92 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_TEST_UTIL_H_ 86 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_TEST_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_service_autofill_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698