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

Side by Side Diff: chrome/browser/chromeos/printer_detector/printer_detector_unittest.cc

Issue 1412813003: This CL replaces user_manager::UserID with AccountId. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@468875--Chrome-OS-handles-deletion-of-Gmail-account-poorly--Create-AccountID-structure-part2--user_names
Patch Set: Fix Win GN build. Created 5 years, 1 month 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/chromeos/printer_detector/printer_detector.h" 5 #include "chrome/browser/chromeos/printer_detector/printer_detector.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 protected: 96 protected:
97 void SetExtensionSystemReady(TestingProfile* profile) { 97 void SetExtensionSystemReady(TestingProfile* profile) {
98 extensions::TestExtensionSystem* test_extension_system = 98 extensions::TestExtensionSystem* test_extension_system =
99 static_cast<extensions::TestExtensionSystem*>( 99 static_cast<extensions::TestExtensionSystem*>(
100 extensions::ExtensionSystem::Get(profile)); 100 extensions::ExtensionSystem::Get(profile));
101 test_extension_system->SetReady(); 101 test_extension_system->SetReady();
102 base::RunLoop().RunUntilIdle(); 102 base::RunLoop().RunUntilIdle();
103 } 103 }
104 104
105 void AddTestUser() { 105 void AddTestUser() {
106 const user_manager::User* user = user_manager_->AddUser(kTestUserId); 106 const user_manager::User* user =
107 user_manager_->AddUser(AccountId::FromUserEmail(kTestUserId));
107 profile_->set_profile_name(kTestUserId); 108 profile_->set_profile_name(kTestUserId);
108 chromeos::ProfileHelper::Get()->SetUserToProfileMappingForTesting( 109 chromeos::ProfileHelper::Get()->SetUserToProfileMappingForTesting(
109 user, profile_.get()); 110 user, profile_.get());
110 chromeos::PrinterDetectorFactory::GetInstance() 111 chromeos::PrinterDetectorFactory::GetInstance()
111 ->Get(profile_.get()) 112 ->Get(profile_.get())
112 ->SetNotificationUIManagerForTesting(&notification_ui_manager_); 113 ->SetNotificationUIManagerForTesting(&notification_ui_manager_);
113 } 114 }
114 115
115 void InvokeUsbAdded(uint16 vendor_id, 116 void InvokeUsbAdded(uint16 vendor_id,
116 uint16 product_id, 117 uint16 product_id,
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 .Set("interfaceClass", kPrinterInterfaceClass)))).Pass(); 330 .Set("interfaceClass", kPrinterInterfaceClass)))).Pass();
330 ASSERT_TRUE(extensions::ExtensionRegistry::Get(profile_.get()) 331 ASSERT_TRUE(extensions::ExtensionRegistry::Get(profile_.get())
331 ->AddEnabled(extension)); 332 ->AddEnabled(extension));
332 333
333 InvokeUsbAdded(123, 456, 1); 334 InvokeUsbAdded(123, 456, 1);
334 335
335 ASSERT_EQ(0u, notification_ui_manager_.GetNotificationCount()); 336 ASSERT_EQ(0u, notification_ui_manager_.GetNotificationCount());
336 } 337 }
337 338
338 } // namespace chromeos 339 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/preferences_unittest.cc ('k') | chrome/browser/chromeos/profiles/profile_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698