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

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

Issue 395013002: Pass signin_scoped_device_id to DeviceInfoSpecifics. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Revers chrome_signin_client Created 6 years, 5 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/id_mapping_helper_unittest.cc » ('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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 EXPECT_CALL(*service, GetAuthError()).WillRepeatedly( 141 EXPECT_CALL(*service, GetAuthError()).WillRepeatedly(
142 testing::ReturnRef(no_error)); 142 testing::ReturnRef(no_error));
143 ON_CALL(*service, GetActiveDataTypes()).WillByDefault( 143 ON_CALL(*service, GetActiveDataTypes()).WillByDefault(
144 testing::Return(preferred_types)); 144 testing::Return(preferred_types));
145 ON_CALL(*service, GetLocalDeviceInfoMock()).WillByDefault( 145 ON_CALL(*service, GetLocalDeviceInfoMock()).WillByDefault(
146 testing::Return(new browser_sync::DeviceInfo( 146 testing::Return(new browser_sync::DeviceInfo(
147 std::string(kSessionTags[0]), 147 std::string(kSessionTags[0]),
148 "machine name", 148 "machine name",
149 "Chromium 10k", 149 "Chromium 10k",
150 "Chrome 10k", 150 "Chrome 10k",
151 sync_pb::SyncEnums_DeviceType_TYPE_LINUX))); 151 sync_pb::SyncEnums_DeviceType_TYPE_LINUX,
152 "device_id")));
152 ON_CALL(*service, GetLocalSyncCacheGUID()).WillByDefault( 153 ON_CALL(*service, GetLocalSyncCacheGUID()).WillByDefault(
153 testing::Return(std::string(kSessionTags[0]))); 154 testing::Return(std::string(kSessionTags[0])));
154 EXPECT_CALL(*service, AddObserver(testing::_)).Times(testing::AnyNumber()); 155 EXPECT_CALL(*service, AddObserver(testing::_)).Times(testing::AnyNumber());
155 EXPECT_CALL(*service, RemoveObserver(testing::_)).Times(testing::AnyNumber()); 156 EXPECT_CALL(*service, RemoveObserver(testing::_)).Times(testing::AnyNumber());
156 157
157 service->Initialize(); 158 service->Initialize();
158 } 159 }
159 160
160 void ExtensionSessionsTest::CreateTestExtension() { 161 void ExtensionSessionsTest::CreateTestExtension() {
161 scoped_ptr<base::DictionaryValue> test_extension_value( 162 scoped_ptr<base::DictionaryValue> test_extension_value(
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 // Disable this test in Metro+Ash for now (http://crbug.com/262796). 343 // Disable this test in Metro+Ash for now (http://crbug.com/262796).
343 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests)) 344 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests))
344 return; 345 return;
345 #endif 346 #endif
346 347
347 ASSERT_TRUE(RunExtensionSubtest("sessions", 348 ASSERT_TRUE(RunExtensionSubtest("sessions",
348 "sessions.html")) << message_; 349 "sessions.html")) << message_;
349 } 350 }
350 351
351 } // namespace extensions 352 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/signed_in_devices/id_mapping_helper_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698