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

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

Issue 398273006: Revert 284234 "Pass signin_scoped_device_id to DeviceInfoSpecifics." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | trunk/src/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")));
153 ON_CALL(*service, GetLocalSyncCacheGUID()).WillByDefault( 152 ON_CALL(*service, GetLocalSyncCacheGUID()).WillByDefault(
154 testing::Return(std::string(kSessionTags[0]))); 153 testing::Return(std::string(kSessionTags[0])));
155 EXPECT_CALL(*service, AddObserver(testing::_)).Times(testing::AnyNumber()); 154 EXPECT_CALL(*service, AddObserver(testing::_)).Times(testing::AnyNumber());
156 EXPECT_CALL(*service, RemoveObserver(testing::_)).Times(testing::AnyNumber()); 155 EXPECT_CALL(*service, RemoveObserver(testing::_)).Times(testing::AnyNumber());
157 156
158 service->Initialize(); 157 service->Initialize();
159 } 158 }
160 159
161 void ExtensionSessionsTest::CreateTestExtension() { 160 void ExtensionSessionsTest::CreateTestExtension() {
162 scoped_ptr<base::DictionaryValue> test_extension_value( 161 scoped_ptr<base::DictionaryValue> test_extension_value(
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 // Disable this test in Metro+Ash for now (http://crbug.com/262796). 342 // Disable this test in Metro+Ash for now (http://crbug.com/262796).
344 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests)) 343 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests))
345 return; 344 return;
346 #endif 345 #endif
347 346
348 ASSERT_TRUE(RunExtensionSubtest("sessions", 347 ASSERT_TRUE(RunExtensionSubtest("sessions",
349 "sessions.html")) << message_; 348 "sessions.html")) << message_;
350 } 349 }
351 350
352 } // namespace extensions 351 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | trunk/src/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