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

Side by Side Diff: chrome/browser/supervised_user/supervised_user_service_unittest.cc

Issue 964563002: Replace SetAuthenticatedUsername with SetAuthenticatedAccountId. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@priv
Patch Set: Fix order of init Created 5 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "base/memory/scoped_ptr.h" 5 #include "base/memory/scoped_ptr.h"
6 #include "base/path_service.h" 6 #include "base/path_service.h"
7 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "base/prefs/scoped_user_pref_update.h" 8 #include "base/prefs/scoped_user_pref_update.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/chrome_notification_types.h" 10 #include "chrome/browser/chrome_notification_types.h"
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 212
213 // Ensure that the CustodianProfileDownloaderService shuts down cleanly. If no 213 // Ensure that the CustodianProfileDownloaderService shuts down cleanly. If no
214 // DCHECK is hit when the service is destroyed, this test passed. 214 // DCHECK is hit when the service is destroyed, this test passed.
215 TEST_F(SupervisedUserServiceTest, ShutDownCustodianProfileDownloader) { 215 TEST_F(SupervisedUserServiceTest, ShutDownCustodianProfileDownloader) {
216 CustodianProfileDownloaderService* downloader_service = 216 CustodianProfileDownloaderService* downloader_service =
217 CustodianProfileDownloaderServiceFactory::GetForProfile(profile_.get()); 217 CustodianProfileDownloaderServiceFactory::GetForProfile(profile_.get());
218 218
219 // Emulate being logged in, then start to download a profile so a 219 // Emulate being logged in, then start to download a profile so a
220 // ProfileDownloader gets created. 220 // ProfileDownloader gets created.
221 SigninManagerFactory::GetForProfile(profile_.get())-> 221 SigninManagerFactory::GetForProfile(profile_.get())->
222 SetAuthenticatedUsername("Logged In"); 222 SetAuthenticatedAccountInfo("12345", "Logged In");
223 downloader_service->DownloadProfile(base::Bind(&OnProfileDownloadedFail)); 223 downloader_service->DownloadProfile(base::Bind(&OnProfileDownloadedFail));
224 } 224 }
225 225
226 namespace { 226 namespace {
227 227
228 class MockPermissionRequestCreator : public PermissionRequestCreator { 228 class MockPermissionRequestCreator : public PermissionRequestCreator {
229 public: 229 public:
230 MockPermissionRequestCreator() : enabled_(false) {} 230 MockPermissionRequestCreator() : enabled_(false) {}
231 ~MockPermissionRequestCreator() override {} 231 ~MockPermissionRequestCreator() override {}
232 232
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 ASSERT_EQ(1u, site_list_observer_.sites().size()); 576 ASSERT_EQ(1u, site_list_observer_.sites().size());
577 EXPECT_EQ(base::ASCIIToUTF16("Moose"), site_list_observer_.sites()[0].name); 577 EXPECT_EQ(base::ASCIIToUTF16("Moose"), site_list_observer_.sites()[0].name);
578 578
579 url_filter_observer_.Wait(); 579 url_filter_observer_.Wait();
580 EXPECT_EQ(SupervisedUserURLFilter::WARN, 580 EXPECT_EQ(SupervisedUserURLFilter::WARN,
581 url_filter->GetFilteringBehaviorForURL(example_url)); 581 url_filter->GetFilteringBehaviorForURL(example_url));
582 EXPECT_EQ(SupervisedUserURLFilter::ALLOW, 582 EXPECT_EQ(SupervisedUserURLFilter::ALLOW,
583 url_filter->GetFilteringBehaviorForURL(moose_url)); 583 url_filter->GetFilteringBehaviorForURL(moose_url));
584 } 584 }
585 #endif // defined(ENABLE_EXTENSIONS) 585 #endif // defined(ENABLE_EXTENSIONS)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698