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

Side by Side Diff: chrome/browser/extensions/api/signed_in_devices/signed_in_devices_api_unittest.cc

Issue 2354613002: [Sync] Fix namespaces for the browser_sync component. (Closed)
Patch Set: Address comments. Created 4 years, 2 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "chrome/browser/extensions/api/signed_in_devices/signed_in_devices_api. h" 5 #include "chrome/browser/extensions/api/signed_in_devices/signed_in_devices_api. h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 131
132 EXPECT_EQ(output2[0]->public_id(), public_id1); 132 EXPECT_EQ(output2[0]->public_id(), public_id1);
133 EXPECT_EQ(output2[1]->public_id(), public_id2); 133 EXPECT_EQ(output2[1]->public_id(), public_id2);
134 134
135 std::string public_id3 = output2[2]->public_id(); 135 std::string public_id3 = output2[2]->public_id();
136 EXPECT_FALSE(public_id3.empty()); 136 EXPECT_FALSE(public_id3.empty());
137 EXPECT_NE(public_id3, public_id1); 137 EXPECT_NE(public_id3, public_id1);
138 EXPECT_NE(public_id3, public_id2); 138 EXPECT_NE(public_id3, public_id2);
139 } 139 }
140 140
141 class ProfileSyncServiceMockForExtensionTests: 141 class ProfileSyncServiceMockForExtensionTests
142 public ProfileSyncServiceMock { 142 : public browser_sync::ProfileSyncServiceMock {
143 public: 143 public:
144 explicit ProfileSyncServiceMockForExtensionTests(Profile* p) 144 explicit ProfileSyncServiceMockForExtensionTests(Profile* p)
145 : ProfileSyncServiceMock(CreateProfileSyncServiceParamsForTest(p)) {} 145 : ProfileSyncServiceMock(CreateProfileSyncServiceParamsForTest(p)) {}
146 ~ProfileSyncServiceMockForExtensionTests() {} 146 ~ProfileSyncServiceMockForExtensionTests() {}
147 147
148 MOCK_METHOD0(Shutdown, void()); 148 MOCK_METHOD0(Shutdown, void());
149 MOCK_CONST_METHOD0(GetDeviceInfoTracker, DeviceInfoTracker*()); 149 MOCK_CONST_METHOD0(GetDeviceInfoTracker, DeviceInfoTracker*());
150 }; 150 };
151 151
152 std::unique_ptr<KeyedService> CreateProfileSyncServiceMock( 152 std::unique_ptr<KeyedService> CreateProfileSyncServiceMock(
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 .WillOnce(Return(&device_tracker)); 250 .WillOnce(Return(&device_tracker));
251 EXPECT_CALL(*pss_mock, Shutdown()); 251 EXPECT_CALL(*pss_mock, Shutdown());
252 252
253 std::vector<std::unique_ptr<DeviceInfo>> output = 253 std::vector<std::unique_ptr<DeviceInfo>> output =
254 GetAllSignedInDevices(extension()->id(), profile()); 254 GetAllSignedInDevices(extension()->id(), profile());
255 255
256 EXPECT_TRUE(output.empty()); 256 EXPECT_TRUE(output.empty());
257 } 257 }
258 258
259 } // namespace extensions 259 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698