OLD | NEW |
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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 CreateTestExtension(); | 118 CreateTestExtension(); |
119 } | 119 } |
120 | 120 |
121 KeyedService* ExtensionSessionsTest::BuildProfileSyncService( | 121 KeyedService* ExtensionSessionsTest::BuildProfileSyncService( |
122 content::BrowserContext* profile) { | 122 content::BrowserContext* profile) { |
123 | 123 |
124 ProfileSyncComponentsFactoryMock* factory = | 124 ProfileSyncComponentsFactoryMock* factory = |
125 new ProfileSyncComponentsFactoryMock(); | 125 new ProfileSyncComponentsFactoryMock(); |
126 | 126 |
127 factory->SetLocalDeviceInfoProvider( | 127 factory->SetLocalDeviceInfoProvider( |
128 scoped_ptr<LocalDeviceInfoProvider>( | 128 scoped_ptr<sync_driver::LocalDeviceInfoProvider>( |
129 new browser_sync::LocalDeviceInfoProviderMock( | 129 new browser_sync::LocalDeviceInfoProviderMock( |
130 kSessionTags[0], | 130 kSessionTags[0], |
131 "machine name", | 131 "machine name", |
132 "Chromium 10k", | 132 "Chromium 10k", |
133 "Chrome 10k", | 133 "Chrome 10k", |
134 sync_pb::SyncEnums_DeviceType_TYPE_LINUX, | 134 sync_pb::SyncEnums_DeviceType_TYPE_LINUX, |
135 "device_id"))); | 135 "device_id"))); |
136 | 136 |
137 return new ProfileSyncServiceMock( | 137 return new ProfileSyncServiceMock( |
138 scoped_ptr<ProfileSyncComponentsFactory>(factory), | 138 scoped_ptr<ProfileSyncComponentsFactory>(factory), |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |
OLD | NEW |