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

Side by Side Diff: trunk/src/chrome/browser/managed_mode/managed_user_sync_service_unittest.cc

Issue 23551005: Revert 219709 "Remove the Extensions URLRequestContext." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <string> 5 #include <string>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "base/threading/sequenced_worker_pool.h" 9 #include "base/threading/sequenced_worker_pool.h"
10 #include "chrome/browser/managed_mode/managed_user_sync_service.h" 10 #include "chrome/browser/managed_mode/managed_user_sync_service.h"
11 #include "chrome/browser/managed_mode/managed_user_sync_service_factory.h" 11 #include "chrome/browser/managed_mode/managed_user_sync_service_factory.h"
12 #include "chrome/browser/prefs/scoped_user_pref_update.h" 12 #include "chrome/browser/prefs/scoped_user_pref_update.h"
13 #include "chrome/common/pref_names.h" 13 #include "chrome/common/pref_names.h"
14 #include "chrome/test/base/testing_profile.h" 14 #include "chrome/test/base/testing_profile.h"
15 #include "content/public/browser/browser_thread.h" 15 #include "content/public/browser/browser_thread.h"
16 #include "content/public/test/test_browser_thread_bundle.h"
17 #include "sync/api/sync_change.h" 16 #include "sync/api/sync_change.h"
18 #include "sync/api/sync_error_factory_mock.h" 17 #include "sync/api/sync_error_factory_mock.h"
19 #include "sync/protocol/sync.pb.h" 18 #include "sync/protocol/sync.pb.h"
20 #include "testing/gtest/include/gtest/gtest.h" 19 #include "testing/gtest/include/gtest/gtest.h"
21 20
22 using sync_pb::ManagedUserSpecifics; 21 using sync_pb::ManagedUserSpecifics;
23 using syncer::MANAGED_USERS; 22 using syncer::MANAGED_USERS;
24 using syncer::SyncChange; 23 using syncer::SyncChange;
25 using syncer::SyncChangeList; 24 using syncer::SyncChangeList;
26 using syncer::SyncChangeProcessor; 25 using syncer::SyncChangeProcessor;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 SyncMergeResult StartInitialSync(); 79 SyncMergeResult StartInitialSync();
81 80
82 void Acknowledge(); 81 void Acknowledge();
83 void ResetService(); 82 void ResetService();
84 83
85 PrefService* prefs() { return profile_.GetPrefs(); } 84 PrefService* prefs() { return profile_.GetPrefs(); }
86 ManagedUserSyncService* service() { return service_; } 85 ManagedUserSyncService* service() { return service_; }
87 MockChangeProcessor* change_processor() { return change_processor_; } 86 MockChangeProcessor* change_processor() { return change_processor_; }
88 87
89 private: 88 private:
90 content::TestBrowserThreadBundle thread_bundle_;
91 TestingProfile profile_; 89 TestingProfile profile_;
92 ManagedUserSyncService* service_; 90 ManagedUserSyncService* service_;
93 91
94 // Owned by the ManagedUserSyncService. 92 // Owned by the ManagedUserSyncService.
95 MockChangeProcessor* change_processor_; 93 MockChangeProcessor* change_processor_;
96 94
97 // A unique ID for creating "remote" Sync data. 95 // A unique ID for creating "remote" Sync data.
98 int64 sync_data_id_; 96 int64 sync_data_id_;
99 }; 97 };
100 98
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 { 237 {
240 SyncChange change = change_processor()->GetChange(kUserId1); 238 SyncChange change = change_processor()->GetChange(kUserId1);
241 ASSERT_TRUE(change.IsValid()); 239 ASSERT_TRUE(change.IsValid());
242 EXPECT_EQ(SyncChange::ACTION_ADD, change.change_type()); 240 EXPECT_EQ(SyncChange::ACTION_ADD, change.change_type());
243 const ManagedUserSpecifics& managed_user = 241 const ManagedUserSpecifics& managed_user =
244 change.sync_data().GetSpecifics().managed_user(); 242 change.sync_data().GetSpecifics().managed_user();
245 EXPECT_EQ(kName1, managed_user.name()); 243 EXPECT_EQ(kName1, managed_user.name());
246 EXPECT_FALSE(managed_user.acknowledged()); 244 EXPECT_FALSE(managed_user.acknowledged());
247 } 245 }
248 } 246 }
OLDNEW
« no previous file with comments | « trunk/src/chrome/browser/io_thread.cc ('k') | trunk/src/chrome/browser/net/chrome_cookie_notification_details.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698