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

Side by Side Diff: chrome/browser/extensions/api/sessions/sessions_apitest.cc

Issue 566623003: Refactor syncable DEVICE_INFO type from ChangeProcessor to SyncableService - part 3. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More CR feedback addressed in DeviceInfoSyncService. Created 6 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/signed_in_devices/signed_in_devices_api.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chrome/browser/extensions/api/sessions/sessions_api.h" 5 #include "chrome/browser/extensions/api/sessions/sessions_api.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "chrome/browser/extensions/api/tabs/tabs_api.h" 10 #include "chrome/browser/extensions/api/tabs/tabs_api.h"
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 profile_manager->RegisterTestingProfile(profile, true, false); 151 profile_manager->RegisterTestingProfile(profile, true, false);
152 ProfileSyncServiceMock* service = static_cast<ProfileSyncServiceMock*>( 152 ProfileSyncServiceMock* service = static_cast<ProfileSyncServiceMock*>(
153 ProfileSyncServiceFactory::GetInstance()->SetTestingFactoryAndUse( 153 ProfileSyncServiceFactory::GetInstance()->SetTestingFactoryAndUse(
154 profile, &ExtensionSessionsTest::BuildProfileSyncService)); 154 profile, &ExtensionSessionsTest::BuildProfileSyncService));
155 browser_ = new Browser(Browser::CreateParams( 155 browser_ = new Browser(Browser::CreateParams(
156 profile, chrome::HOST_DESKTOP_TYPE_NATIVE)); 156 profile, chrome::HOST_DESKTOP_TYPE_NATIVE));
157 157
158 syncer::ModelTypeSet preferred_types; 158 syncer::ModelTypeSet preferred_types;
159 preferred_types.Put(syncer::SESSIONS); 159 preferred_types.Put(syncer::SESSIONS);
160 GoogleServiceAuthError no_error(GoogleServiceAuthError::NONE); 160 GoogleServiceAuthError no_error(GoogleServiceAuthError::NONE);
161 ON_CALL(*service, IsSessionsDataTypeControllerRunning()) 161 ON_CALL(*service, IsDataTypeControllerRunning(syncer::SESSIONS))
162 .WillByDefault(testing::Return(true)); 162 .WillByDefault(testing::Return(true));
163 ON_CALL(*service, GetRegisteredDataTypes()) 163 ON_CALL(*service, GetRegisteredDataTypes())
164 .WillByDefault(testing::Return(syncer::UserTypes())); 164 .WillByDefault(testing::Return(syncer::UserTypes()));
165 ON_CALL(*service, GetPreferredDataTypes()).WillByDefault( 165 ON_CALL(*service, GetPreferredDataTypes()).WillByDefault(
166 testing::Return(preferred_types)); 166 testing::Return(preferred_types));
167 EXPECT_CALL(*service, GetAuthError()).WillRepeatedly( 167 EXPECT_CALL(*service, GetAuthError()).WillRepeatedly(
168 testing::ReturnRef(no_error)); 168 testing::ReturnRef(no_error));
169 ON_CALL(*service, GetActiveDataTypes()).WillByDefault( 169 ON_CALL(*service, GetActiveDataTypes()).WillByDefault(
170 testing::Return(preferred_types)); 170 testing::Return(preferred_types));
171 171
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 // Disable this test in Metro+Ash for now (http://crbug.com/262796). 360 // Disable this test in Metro+Ash for now (http://crbug.com/262796).
361 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests)) 361 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests))
362 return; 362 return;
363 #endif 363 #endif
364 364
365 ASSERT_TRUE(RunExtensionSubtest("sessions", 365 ASSERT_TRUE(RunExtensionSubtest("sessions",
366 "sessions.html")) << message_; 366 "sessions.html")) << message_;
367 } 367 }
368 368
369 } // namespace extensions 369 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/signed_in_devices/signed_in_devices_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698