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

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

Issue 146193005: Reland 251352 "cros: Enable multiprofile for everyone." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix browser_tests compile and remove unneeded header Created 6 years, 10 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 (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/login/screen_locker.h" 5 #include "chrome/browser/chromeos/login/screen_locker.h"
6 6
7 #include "ash/wm/window_state.h" 7 #include "ash/wm/window_state.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 scoped_ptr<SessionManagerClient>(fake_session_manager_client_)); 125 scoped_ptr<SessionManagerClient>(fake_session_manager_client_));
126 DBusThreadManager::SetInstanceForTesting(fake_dbus_thread_manager); 126 DBusThreadManager::SetInstanceForTesting(fake_dbus_thread_manager);
127 127
128 InProcessBrowserTest::SetUpInProcessBrowserTestFixture(); 128 InProcessBrowserTest::SetUpInProcessBrowserTestFixture();
129 zero_duration_mode_.reset(new ui::ScopedAnimationDurationScaleMode( 129 zero_duration_mode_.reset(new ui::ScopedAnimationDurationScaleMode(
130 ui::ScopedAnimationDurationScaleMode::ZERO_DURATION)); 130 ui::ScopedAnimationDurationScaleMode::ZERO_DURATION));
131 } 131 }
132 132
133 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { 133 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
134 command_line->AppendSwitchASCII(switches::kLoginProfile, "user"); 134 command_line->AppendSwitchASCII(switches::kLoginProfile, "user");
135 command_line->AppendSwitch(switches::kForceMultiProfileInTests);
136 } 135 }
137 136
138 scoped_ptr<ui::ScopedAnimationDurationScaleMode> zero_duration_mode_; 137 scoped_ptr<ui::ScopedAnimationDurationScaleMode> zero_duration_mode_;
139 138
140 DISALLOW_COPY_AND_ASSIGN(ScreenLockerTest); 139 DISALLOW_COPY_AND_ASSIGN(ScreenLockerTest);
141 }; 140 };
142 141
143 IN_PROC_BROWSER_TEST_F(ScreenLockerTest, TestBasic) { 142 IN_PROC_BROWSER_TEST_F(ScreenLockerTest, TestBasic) {
144 ScreenLocker::Show(); 143 ScreenLocker::Show();
145 scoped_ptr<test::ScreenLockerTester> tester(ScreenLocker::GetTester()); 144 scoped_ptr<test::ScreenLockerTester> tester(ScreenLocker::GetTester());
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 EXPECT_EQ("", tester->GetPassword()); 293 EXPECT_EQ("", tester->GetPassword());
295 294
296 // Close the locker to match expectations. 295 // Close the locker to match expectations.
297 ScreenLocker::Hide(); 296 ScreenLocker::Hide();
298 content::RunAllPendingInMessageLoop(); 297 content::RunAllPendingInMessageLoop();
299 EXPECT_FALSE(tester->IsLocked()); 298 EXPECT_FALSE(tester->IsLocked());
300 EXPECT_TRUE(VerifyLockScreenDismissed()); 299 EXPECT_TRUE(VerifyLockScreenDismissed());
301 } 300 }
302 301
303 } // namespace chromeos 302 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698