Index: chrome/browser/chromeos/login/kiosk_browsertest.cc |
diff --git a/chrome/browser/chromeos/login/kiosk_browsertest.cc b/chrome/browser/chromeos/login/kiosk_browsertest.cc |
index 2b62db76b8ff72009a98a70a5bad008320b29cc8..728920387ecd0a0f10f59230b611556410b02f4d 100644 |
--- a/chrome/browser/chromeos/login/kiosk_browsertest.cc |
+++ b/chrome/browser/chromeos/login/kiosk_browsertest.cc |
@@ -10,6 +10,7 @@ |
#include "ash/shell.h" |
#include "base/file_util.h" |
#include "base/path_service.h" |
+#include "base/prefs/pref_service.h" |
#include "base/strings/string_number_conversions.h" |
#include "base/strings/string_util.h" |
#include "chrome/browser/browser_process.h" |
@@ -38,6 +39,7 @@ |
#include "chrome/common/pref_names.h" |
#include "chromeos/chromeos_switches.h" |
#include "chromeos/dbus/cryptohome_client.h" |
+#include "components/signin/core/common/signin_pref_names.h" |
#include "content/public/browser/notification_observer.h" |
#include "content/public/browser/notification_registrar.h" |
#include "content/public/browser/notification_service.h" |
@@ -540,6 +542,18 @@ IN_PROC_BROWSER_TEST_F(KioskTest, InstallAndLaunchApp) { |
WaitForAppLaunchSuccess(); |
} |
+IN_PROC_BROWSER_TEST_F(KioskTest, NotSignedInWithGAIAAccount) { |
+ // Tests that the kiosk session is not considered to be logged in with a GAIA |
+ // account. |
+ StartAppLaunchFromLoginScreen(SimulateNetworkOnlineClosure()); |
+ WaitForAppLaunchSuccess(); |
+ |
+ Profile* app_profile = ProfileManager::GetPrimaryUserProfile(); |
+ ASSERT_TRUE(app_profile); |
+ EXPECT_FALSE(app_profile->GetPrefs()->HasPrefPath( |
+ prefs::kGoogleServicesUsername)); |
+} |
+ |
IN_PROC_BROWSER_TEST_F(KioskTest, PRE_LaunchAppNetworkDown) { |
// Tests the network down case for the initial app download and launch. |
RunAppLaunchNetworkDownTest(); |
@@ -1203,6 +1217,13 @@ IN_PROC_BROWSER_TEST_F(KioskEnterpriseTest, EnterpriseKioskApp) { |
&result)); |
EXPECT_EQ(kTestAccessToken, result); |
+ // Verify that the session is not considered to be logged in with a GAIA |
+ // account. |
+ Profile* app_profile = ProfileManager::GetPrimaryUserProfile(); |
+ ASSERT_TRUE(app_profile); |
+ EXPECT_FALSE(app_profile->GetPrefs()->HasPrefPath( |
+ prefs::kGoogleServicesUsername)); |
+ |
// Terminate the app. |
window->GetBaseWindow()->Close(); |
content::RunAllPendingInMessageLoop(); |