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

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

Issue 1425093004: Revert of 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: 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 = 106 const user_manager::User* user = user_manager_->AddUser(kTestUserId);
107 user_manager_->AddUser(AccountId::FromUserEmail(kTestUserId));
108 profile_->set_profile_name(kTestUserId); 107 profile_->set_profile_name(kTestUserId);
109 chromeos::ProfileHelper::Get()->SetUserToProfileMappingForTesting( 108 chromeos::ProfileHelper::Get()->SetUserToProfileMappingForTesting(
110 user, profile_.get()); 109 user, profile_.get());
111 chromeos::PrinterDetectorFactory::GetInstance() 110 chromeos::PrinterDetectorFactory::GetInstance()
112 ->Get(profile_.get()) 111 ->Get(profile_.get())
113 ->SetNotificationUIManagerForTesting(&notification_ui_manager_); 112 ->SetNotificationUIManagerForTesting(&notification_ui_manager_);
114 } 113 }
115 114
116 void InvokeUsbAdded(uint16 vendor_id, 115 void InvokeUsbAdded(uint16 vendor_id,
117 uint16 product_id, 116 uint16 product_id,
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 .Set("interfaceClass", kPrinterInterfaceClass)))).Pass(); 329 .Set("interfaceClass", kPrinterInterfaceClass)))).Pass();
331 ASSERT_TRUE(extensions::ExtensionRegistry::Get(profile_.get()) 330 ASSERT_TRUE(extensions::ExtensionRegistry::Get(profile_.get())
332 ->AddEnabled(extension)); 331 ->AddEnabled(extension));
333 332
334 InvokeUsbAdded(123, 456, 1); 333 InvokeUsbAdded(123, 456, 1);
335 334
336 ASSERT_EQ(0u, notification_ui_manager_.GetNotificationCount()); 335 ASSERT_EQ(0u, notification_ui_manager_.GetNotificationCount());
337 } 336 }
338 337
339 } // namespace chromeos 338 } // 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