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

Unified Diff: chrome/browser/chromeos/login/login_browsertest.cc

Issue 10590004: [cros] Fake a stub user login when no --login-manager and --login-user are given. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/login/login_browsertest.cc
diff --git a/chrome/browser/chromeos/login/login_browsertest.cc b/chrome/browser/chromeos/login/login_browsertest.cc
index 8ff365584f3ebf23e336cdf65878f910ad5b20ac..212278d5b57dec877bdad441188908de2c7ea40e 100644
--- a/chrome/browser/chromeos/login/login_browsertest.cc
+++ b/chrome/browser/chromeos/login/login_browsertest.cc
@@ -63,9 +63,11 @@ class LoginUserTest : public LoginTestBase {
}
};
-class LoginProfileTest : public LoginUserTest {
+class LoginGuestTest : public LoginTestBase {
protected:
virtual void SetUpCommandLine(CommandLine* command_line) {
+ command_line->AppendSwitch(switches::kGuestSession);
+ command_line->AppendSwitch(switches::kIncognito);
command_line->AppendSwitchASCII(switches::kLoginProfile, "user");
command_line->AppendSwitch(switches::kNoFirstRun);
}
@@ -80,8 +82,8 @@ IN_PROC_BROWSER_TEST_F(LoginUserTest, UserPassed) {
EXPECT_FALSE(profile->IsOffTheRecord());
}
-// On initial launch, we should get the OTR default profile.
-IN_PROC_BROWSER_TEST_F(LoginProfileTest, UserNotPassed) {
+// After a guest login, we should get the OTR default profile.
+IN_PROC_BROWSER_TEST_F(LoginGuestTest, GuestIsOTR) {
Profile* profile = browser()->profile();
EXPECT_EQ("Default", profile->GetPath().BaseName().value());
EXPECT_TRUE(profile->IsOffTheRecord());

Powered by Google App Engine
This is Rietveld 408576698