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

Side by Side Diff: chrome/browser/chromeos/login/login_browsertest.cc

Issue 11365181: Remove GetExtensionService from Profile. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: replace missing extension_system include Created 8 years 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 "ash/shell.h" 5 #include "ash/shell.h"
6 #include "ash/wm/cursor_manager.h" 6 #include "ash/wm/cursor_manager.h"
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/chromeos/cros/cros_in_process_browser_test.h" 8 #include "chrome/browser/chromeos/cros/cros_in_process_browser_test.h"
9 #include "chrome/browser/chromeos/cros/mock_cryptohome_library.h" 9 #include "chrome/browser/chromeos/cros/mock_cryptohome_library.h"
10 #include "chrome/browser/chromeos/cros/mock_network_library.h" 10 #include "chrome/browser/chromeos/cros/mock_network_library.h"
11 #include "chrome/browser/chromeos/login/base_login_display_host.h" 11 #include "chrome/browser/chromeos/login/base_login_display_host.h"
12 #include "chrome/browser/chromeos/login/login_wizard.h" 12 #include "chrome/browser/chromeos/login/login_wizard.h"
13 #include "chrome/browser/chromeos/login/wizard_controller.h" 13 #include "chrome/browser/chromeos/login/wizard_controller.h"
14 #include "chrome/browser/extensions/extension_system.h"
14 #include "chrome/browser/profiles/profile_manager.h" 15 #include "chrome/browser/profiles/profile_manager.h"
15 #include "chrome/browser/ui/browser.h" 16 #include "chrome/browser/ui/browser.h"
16 #include "chrome/common/chrome_switches.h" 17 #include "chrome/common/chrome_switches.h"
17 #include "chrome/test/base/interactive_test_utils.h" 18 #include "chrome/test/base/interactive_test_utils.h"
18 #include "chrome/test/base/in_process_browser_test.h" 19 #include "chrome/test/base/in_process_browser_test.h"
19 #include "chrome/test/base/ui_test_utils.h" 20 #include "chrome/test/base/ui_test_utils.h"
20 #include "testing/gmock/include/gmock/gmock.h" 21 #include "testing/gmock/include/gmock/gmock.h"
21 #include "testing/gtest/include/gtest/gtest.h" 22 #include "testing/gtest/include/gtest/gtest.h"
22 23
23 using ::testing::_; 24 using ::testing::_;
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 IN_PROC_BROWSER_TEST_F(LoginUserTest, CursorShown) { 101 IN_PROC_BROWSER_TEST_F(LoginUserTest, CursorShown) {
101 EXPECT_TRUE(ash::Shell::GetInstance()->cursor_manager()->cursor_visible()); 102 EXPECT_TRUE(ash::Shell::GetInstance()->cursor_manager()->cursor_visible());
102 } 103 }
103 104
104 // After a guest login, we should get the OTR default profile. 105 // After a guest login, we should get the OTR default profile.
105 IN_PROC_BROWSER_TEST_F(LoginGuestTest, GuestIsOTR) { 106 IN_PROC_BROWSER_TEST_F(LoginGuestTest, GuestIsOTR) {
106 Profile* profile = browser()->profile(); 107 Profile* profile = browser()->profile();
107 EXPECT_EQ("Default", profile->GetPath().BaseName().value()); 108 EXPECT_EQ("Default", profile->GetPath().BaseName().value());
108 EXPECT_TRUE(profile->IsOffTheRecord()); 109 EXPECT_TRUE(profile->IsOffTheRecord());
109 // Ensure there's extension service for this profile. 110 // Ensure there's extension service for this profile.
110 EXPECT_TRUE(profile->GetExtensionService()); 111 EXPECT_TRUE(extensions::ExtensionSystem::Get(profile)->extension_service());
111 } 112 }
112 113
113 // Verifies the cursor is not hidden at startup when running guest session. 114 // Verifies the cursor is not hidden at startup when running guest session.
114 IN_PROC_BROWSER_TEST_F(LoginGuestTest, CursorShown) { 115 IN_PROC_BROWSER_TEST_F(LoginGuestTest, CursorShown) {
115 EXPECT_TRUE(ash::Shell::GetInstance()->cursor_manager()->cursor_visible()); 116 EXPECT_TRUE(ash::Shell::GetInstance()->cursor_manager()->cursor_visible());
116 } 117 }
117 118
118 // Verifies the cursor is hidden at startup on login screen. 119 // Verifies the cursor is hidden at startup on login screen.
119 IN_PROC_BROWSER_TEST_F(LoginCursorTest, CursorHidden) { 120 IN_PROC_BROWSER_TEST_F(LoginCursorTest, CursorHidden) {
120 // Login screen needs to be shown explicitly when running test. 121 // Login screen needs to be shown explicitly when running test.
121 ShowLoginWizard(WizardController::kLoginScreenName, gfx::Size()); 122 ShowLoginWizard(WizardController::kLoginScreenName, gfx::Size());
122 123
123 // Cursor should be hidden at startup 124 // Cursor should be hidden at startup
124 EXPECT_FALSE(ash::Shell::GetInstance()->cursor_manager()->cursor_visible()); 125 EXPECT_FALSE(ash::Shell::GetInstance()->cursor_manager()->cursor_visible());
125 126
126 // Cursor should be shown after cursor is moved. 127 // Cursor should be shown after cursor is moved.
127 EXPECT_TRUE(ui_test_utils::SendMouseMoveSync(gfx::Point())); 128 EXPECT_TRUE(ui_test_utils::SendMouseMoveSync(gfx::Point()));
128 EXPECT_TRUE(ash::Shell::GetInstance()->cursor_manager()->cursor_visible()); 129 EXPECT_TRUE(ash::Shell::GetInstance()->cursor_manager()->cursor_visible());
129 130
130 MessageLoop::current()->DeleteSoon(FROM_HERE, 131 MessageLoop::current()->DeleteSoon(FROM_HERE,
131 BaseLoginDisplayHost::default_host()); 132 BaseLoginDisplayHost::default_host());
132 } 133 }
133 134
134 } // namespace chromeos 135 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/help_app_launcher.cc ('k') | chrome/browser/chromeos/offline/offline_load_page.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698