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

Side by Side Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc

Issue 444903002: [cros] user_manager component - move UserManagerBase and UserManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 4 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
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/ui/ash/launcher/chrome_launcher_controller.h" 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 #include "ui/aura/client/window_tree_client.h" 46 #include "ui/aura/client/window_tree_client.h"
47 #include "ui/base/models/menu_model.h" 47 #include "ui/base/models/menu_model.h"
48 48
49 #if defined(OS_CHROMEOS) 49 #if defined(OS_CHROMEOS)
50 #include "apps/app_window_contents.h" 50 #include "apps/app_window_contents.h"
51 #include "apps/app_window_registry.h" 51 #include "apps/app_window_registry.h"
52 #include "apps/ui/native_app_window.h" 52 #include "apps/ui/native_app_window.h"
53 #include "ash/test/test_session_state_delegate.h" 53 #include "ash/test/test_session_state_delegate.h"
54 #include "ash/test/test_shell_delegate.h" 54 #include "ash/test/test_shell_delegate.h"
55 #include "chrome/browser/chromeos/login/users/fake_user_manager.h" 55 #include "chrome/browser/chromeos/login/users/fake_user_manager.h"
56 #include "chrome/browser/chromeos/login/users/scoped_user_manager_enabler.h"
56 #include "chrome/browser/ui/apps/chrome_app_delegate.h" 57 #include "chrome/browser/ui/apps/chrome_app_delegate.h"
57 #include "chrome/browser/ui/ash/launcher/app_window_launcher_controller.h" 58 #include "chrome/browser/ui/ash/launcher/app_window_launcher_controller.h"
58 #include "chrome/browser/ui/ash/launcher/browser_status_monitor.h" 59 #include "chrome/browser/ui/ash/launcher/browser_status_monitor.h"
59 #include "chrome/browser/ui/ash/multi_user/multi_user_util.h" 60 #include "chrome/browser/ui/ash/multi_user/multi_user_util.h"
60 #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager.h" 61 #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager.h"
61 #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.h" 62 #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.h"
62 #include "chrome/common/chrome_constants.h" 63 #include "chrome/common/chrome_constants.h"
63 #include "chrome/common/chrome_switches.h" 64 #include "chrome/common/chrome_switches.h"
64 #include "chrome/test/base/testing_browser_process.h" 65 #include "chrome/test/base/testing_browser_process.h"
65 #include "chrome/test/base/testing_profile_manager.h" 66 #include "chrome/test/base/testing_profile_manager.h"
(...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after
918 profile_manager_->DeleteTestingProfile(it->second); 919 profile_manager_->DeleteTestingProfile(it->second);
919 created_profiles_.erase(it); 920 created_profiles_.erase(it);
920 } 921 }
921 922
922 private: 923 private:
923 typedef std::map<Profile*, std::string> ProfileToNameMap; 924 typedef std::map<Profile*, std::string> ProfileToNameMap;
924 TestingProfileManager* profile_manager() { return profile_manager_.get(); } 925 TestingProfileManager* profile_manager() { return profile_manager_.get(); }
925 926
926 chromeos::FakeUserManager* GetFakeUserManager() { 927 chromeos::FakeUserManager* GetFakeUserManager() {
927 return static_cast<chromeos::FakeUserManager*>( 928 return static_cast<chromeos::FakeUserManager*>(
928 chromeos::UserManager::Get()); 929 user_manager::UserManager::Get());
929 } 930 }
930 931
931 scoped_ptr<TestingProfileManager> profile_manager_; 932 scoped_ptr<TestingProfileManager> profile_manager_;
932 scoped_ptr<chromeos::ScopedUserManagerEnabler> user_manager_enabler_; 933 scoped_ptr<chromeos::ScopedUserManagerEnabler> user_manager_enabler_;
933 934
934 ash::test::TestShellDelegate* shell_delegate_; 935 ash::test::TestShellDelegate* shell_delegate_;
935 936
936 ProfileToNameMap created_profiles_; 937 ProfileToNameMap created_profiles_;
937 938
938 DISALLOW_COPY_AND_ASSIGN( 939 DISALLOW_COPY_AND_ASSIGN(
(...skipping 1752 matching lines...) Expand 10 before | Expand all | Expand 10 after
2691 2692
2692 EXPECT_EQ(1, app_icon_loader->fetch_count()); 2693 EXPECT_EQ(1, app_icon_loader->fetch_count());
2693 ASSERT_EQ(initial_size + 1, model_->items().size()); 2694 ASSERT_EQ(initial_size + 1, model_->items().size());
2694 EXPECT_TRUE(launcher_controller_->IsAppPinned("1")); 2695 EXPECT_TRUE(launcher_controller_->IsAppPinned("1"));
2695 EXPECT_FALSE(launcher_controller_->IsAppPinned("0")); 2696 EXPECT_FALSE(launcher_controller_->IsAppPinned("0"));
2696 EXPECT_EQ(ash::TYPE_APP_SHORTCUT, model_->items()[app_index].type); 2697 EXPECT_EQ(ash::TYPE_APP_SHORTCUT, model_->items()[app_index].type);
2697 2698
2698 launcher_controller_->UnpinAppWithID("1"); 2699 launcher_controller_->UnpinAppWithID("1");
2699 ASSERT_EQ(initial_size, model_->items().size()); 2700 ASSERT_EQ(initial_size, model_->items().size());
2700 } 2701 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698