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

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

Issue 251703004: Do not set kGoogleServicesUsername for device-local accounts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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/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();
« no previous file with comments | « chrome/browser/chromeos/chrome_browser_main_chromeos.cc ('k') | chrome/browser/chromeos/login/login_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698