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

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

Issue 1336823003: Move chrome::HostDesktopType to ui::HostDesktopType (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@base_session_service_delegate_impl
Patch Set: Fix build on Mac and CrOS Created 5 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
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/pattern.h" 9 #include "base/strings/pattern.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 PathService::Get(chrome::DIR_USER_DATA, &path); 146 PathService::Get(chrome::DIR_USER_DATA, &path);
147 path = path.AppendASCII("test_profile"); 147 path = path.AppendASCII("test_profile");
148 if (!base::PathExists(path)) 148 if (!base::PathExists(path))
149 CHECK(base::CreateDirectory(path)); 149 CHECK(base::CreateDirectory(path));
150 Profile* profile = 150 Profile* profile =
151 Profile::CreateProfile(path, NULL, Profile::CREATE_MODE_SYNCHRONOUS); 151 Profile::CreateProfile(path, NULL, Profile::CREATE_MODE_SYNCHRONOUS);
152 profile_manager->RegisterTestingProfile(profile, true, false); 152 profile_manager->RegisterTestingProfile(profile, true, false);
153 ProfileSyncServiceMock* service = static_cast<ProfileSyncServiceMock*>( 153 ProfileSyncServiceMock* service = static_cast<ProfileSyncServiceMock*>(
154 ProfileSyncServiceFactory::GetInstance()->SetTestingFactoryAndUse( 154 ProfileSyncServiceFactory::GetInstance()->SetTestingFactoryAndUse(
155 profile, &ExtensionSessionsTest::BuildProfileSyncService)); 155 profile, &ExtensionSessionsTest::BuildProfileSyncService));
156 browser_ = new Browser(Browser::CreateParams( 156 browser_ =
157 profile, chrome::HOST_DESKTOP_TYPE_NATIVE)); 157 new Browser(Browser::CreateParams(profile, ui::HOST_DESKTOP_TYPE_NATIVE));
158 158
159 syncer::ModelTypeSet preferred_types; 159 syncer::ModelTypeSet preferred_types;
160 preferred_types.Put(syncer::SESSIONS); 160 preferred_types.Put(syncer::SESSIONS);
161 GoogleServiceAuthError no_error(GoogleServiceAuthError::NONE); 161 GoogleServiceAuthError no_error(GoogleServiceAuthError::NONE);
162 ON_CALL(*service, IsDataTypeControllerRunning(syncer::SESSIONS)) 162 ON_CALL(*service, IsDataTypeControllerRunning(syncer::SESSIONS))
163 .WillByDefault(testing::Return(true)); 163 .WillByDefault(testing::Return(true));
164 ON_CALL(*service, GetRegisteredDataTypes()) 164 ON_CALL(*service, GetRegisteredDataTypes())
165 .WillByDefault(testing::Return(syncer::UserTypes())); 165 .WillByDefault(testing::Return(syncer::UserTypes()));
166 ON_CALL(*service, GetPreferredDataTypes()).WillByDefault( 166 ON_CALL(*service, GetPreferredDataTypes()).WillByDefault(
167 testing::Return(preferred_types)); 167 testing::Return(preferred_types));
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 return; 384 return;
385 #endif 385 #endif
386 386
387 ASSERT_TRUE(RunExtensionSubtest("sessions", 387 ASSERT_TRUE(RunExtensionSubtest("sessions",
388 "sessions.html")) << message_; 388 "sessions.html")) << message_;
389 } 389 }
390 390
391 } // namespace 391 } // namespace
392 392
393 } // namespace extensions 393 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698