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

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

Issue 1662783002: Remove HostDesktopType from Browser::CreateParams (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-12
Patch Set: remove desktop_type_ in bookmark_bubble_sign_in_delegate Created 4 years, 10 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 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 <stddef.h> 5 #include <stddef.h>
6 #include <utility> 6 #include <utility>
7 7
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 PathService::Get(chrome::DIR_USER_DATA, &path); 158 PathService::Get(chrome::DIR_USER_DATA, &path);
159 path = path.AppendASCII("test_profile"); 159 path = path.AppendASCII("test_profile");
160 if (!base::PathExists(path)) 160 if (!base::PathExists(path))
161 CHECK(base::CreateDirectory(path)); 161 CHECK(base::CreateDirectory(path));
162 Profile* profile = 162 Profile* profile =
163 Profile::CreateProfile(path, NULL, Profile::CREATE_MODE_SYNCHRONOUS); 163 Profile::CreateProfile(path, NULL, Profile::CREATE_MODE_SYNCHRONOUS);
164 profile_manager->RegisterTestingProfile(profile, true, false); 164 profile_manager->RegisterTestingProfile(profile, true, false);
165 ProfileSyncServiceMock* service = static_cast<ProfileSyncServiceMock*>( 165 ProfileSyncServiceMock* service = static_cast<ProfileSyncServiceMock*>(
166 ProfileSyncServiceFactory::GetInstance()->SetTestingFactoryAndUse( 166 ProfileSyncServiceFactory::GetInstance()->SetTestingFactoryAndUse(
167 profile, &ExtensionSessionsTest::BuildProfileSyncService)); 167 profile, &ExtensionSessionsTest::BuildProfileSyncService));
168 browser_ = new Browser(Browser::CreateParams( 168 browser_ = new Browser(Browser::CreateParams(profile));
169 profile, chrome::HOST_DESKTOP_TYPE_NATIVE));
170 169
171 syncer::ModelTypeSet preferred_types; 170 syncer::ModelTypeSet preferred_types;
172 preferred_types.Put(syncer::SESSIONS); 171 preferred_types.Put(syncer::SESSIONS);
173 GoogleServiceAuthError no_error(GoogleServiceAuthError::NONE); 172 GoogleServiceAuthError no_error(GoogleServiceAuthError::NONE);
174 ON_CALL(*service, IsDataTypeControllerRunning(syncer::SESSIONS)) 173 ON_CALL(*service, IsDataTypeControllerRunning(syncer::SESSIONS))
175 .WillByDefault(testing::Return(true)); 174 .WillByDefault(testing::Return(true));
176 ON_CALL(*service, GetRegisteredDataTypes()) 175 ON_CALL(*service, GetRegisteredDataTypes())
177 .WillByDefault(testing::Return(syncer::UserTypes())); 176 .WillByDefault(testing::Return(syncer::UserTypes()));
178 ON_CALL(*service, GetPreferredDataTypes()).WillByDefault( 177 ON_CALL(*service, GetPreferredDataTypes()).WillByDefault(
179 testing::Return(preferred_types)); 178 testing::Return(preferred_types));
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 return; 395 return;
397 #endif 396 #endif
398 397
399 ASSERT_TRUE(RunExtensionSubtest("sessions", 398 ASSERT_TRUE(RunExtensionSubtest("sessions",
400 "sessions.html")) << message_; 399 "sessions.html")) << message_;
401 } 400 }
402 401
403 } // namespace 402 } // namespace
404 403
405 } // namespace extensions 404 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/sessions/sessions_api.cc ('k') | chrome/browser/extensions/api/tabs/tabs_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698