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

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

Issue 130613004: Enabled consumer kiosk mode for all. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 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 7c54d77e84757919950fde7baf85cfe5a5638713..095fca02f83c76f9e1e795b778a26f884776dc5b 100644
--- a/chrome/browser/chromeos/login/kiosk_browsertest.cc
+++ b/chrome/browser/chromeos/login/kiosk_browsertest.cc
@@ -71,18 +71,18 @@ const char kTestClientId[] = "fake-client-id";
const char kTestAppScope[] =
"https://www.googleapis.com/auth/userinfo.profile";
-// Helper function for GetConsumerKioskModeStatusCallback.
-void ConsumerKioskModeStatusCheck(
- KioskAppManager::ConsumerKioskModeStatus* out_status,
+// Helper function for GetConsumerKioskAutoLaunchStatusCallback.
+void ConsumerKioskAutoLaunchStatusCheck(
+ KioskAppManager::ConsumerKioskAutoLaunchStatus* out_status,
const base::Closure& runner_quit_task,
- KioskAppManager::ConsumerKioskModeStatus in_status) {
+ KioskAppManager::ConsumerKioskAutoLaunchStatus in_status) {
LOG(INFO) << "KioskAppManager::ConsumerKioskModeStatus = " << in_status;
*out_status = in_status;
runner_quit_task.Run();
}
// Helper KioskAppManager::EnableKioskModeCallback implementation.
-void ConsumerKioskModeLockCheck(
+void ConsumerKioskModeAutoStartLockCheck(
bool* out_locked,
const base::Closure& runner_quit_task,
bool in_locked) {
@@ -396,25 +396,27 @@ class KioskTest : public OobeBaseTest {
scoped_ptr<bool> locked(new bool(false));
scoped_refptr<content::MessageLoopRunner> runner =
new content::MessageLoopRunner;
- KioskAppManager::Get()->EnableConsumerModeKiosk(
- base::Bind(&ConsumerKioskModeLockCheck,
+ KioskAppManager::Get()->EnableConsumerKioskAutoLaunch(
+ base::Bind(&ConsumerKioskModeAutoStartLockCheck,
locked.get(),
runner->QuitClosure()));
runner->Run();
EXPECT_TRUE(*locked.get());
}
- KioskAppManager::ConsumerKioskModeStatus GetConsumerKioskModeStatus() {
- KioskAppManager::ConsumerKioskModeStatus status =
- static_cast<KioskAppManager::ConsumerKioskModeStatus>(-1);
+ KioskAppManager::ConsumerKioskAutoLaunchStatus
+ GetConsumerKioskModeStatus() {
+ KioskAppManager::ConsumerKioskAutoLaunchStatus status =
+ static_cast<KioskAppManager::ConsumerKioskAutoLaunchStatus>(-1);
scoped_refptr<content::MessageLoopRunner> runner =
new content::MessageLoopRunner;
- KioskAppManager::Get()->GetConsumerKioskModeStatus(
- base::Bind(&ConsumerKioskModeStatusCheck,
+ KioskAppManager::Get()->GetConsumerKioskAutoLaunchStatus(
+ base::Bind(&ConsumerKioskAutoLaunchStatusCheck,
&status,
runner->QuitClosure()));
runner->Run();
- CHECK_NE(status, static_cast<KioskAppManager::ConsumerKioskModeStatus>(-1));
+ CHECK_NE(status,
+ static_cast<KioskAppManager::ConsumerKioskAutoLaunchStatus>(-1));
return status;
}
@@ -612,7 +614,7 @@ IN_PROC_BROWSER_TEST_F(KioskTest, KioskEnableCancel) {
CHECK(wizard_controller);
// Check Kiosk mode status.
- EXPECT_EQ(KioskAppManager::CONSUMER_KIOSK_MODE_CONFIGURABLE,
+ EXPECT_EQ(KioskAppManager::CONSUMER_KIOSK_AUTO_LAUNCH_CONFIGURABLE,
GetConsumerKioskModeStatus());
// Wait for the login UI to come up and switch to the kiosk_enable screen.
@@ -637,7 +639,7 @@ IN_PROC_BROWSER_TEST_F(KioskTest, KioskEnableCancel) {
content::NotificationService::AllSources()).Wait();
// Check that the status still says configurable.
- EXPECT_EQ(KioskAppManager::CONSUMER_KIOSK_MODE_CONFIGURABLE,
+ EXPECT_EQ(KioskAppManager::CONSUMER_KIOSK_AUTO_LAUNCH_CONFIGURABLE,
GetConsumerKioskModeStatus());
}
@@ -649,7 +651,7 @@ IN_PROC_BROWSER_TEST_F(KioskTest, KioskEnableConfirmed) {
CHECK(wizard_controller);
// Check Kiosk mode status.
- EXPECT_EQ(KioskAppManager::CONSUMER_KIOSK_MODE_CONFIGURABLE,
+ EXPECT_EQ(KioskAppManager::CONSUMER_KIOSK_AUTO_LAUNCH_CONFIGURABLE,
GetConsumerKioskModeStatus());
wizard_controller->SkipToLoginForTesting(LoginScreenContext());
@@ -673,7 +675,7 @@ IN_PROC_BROWSER_TEST_F(KioskTest, KioskEnableConfirmed) {
content::WindowedNotificationObserver(
chrome::NOTIFICATION_KIOSK_ENABLED,
content::NotificationService::AllSources()).Wait();
- EXPECT_EQ(KioskAppManager::CONSUMER_KIOSK_MODE_ENABLED,
+ EXPECT_EQ(KioskAppManager::CONSUMER_KIOSK_AUTO_LAUNCH_ENABLED,
GetConsumerKioskModeStatus());
}
@@ -694,7 +696,7 @@ IN_PROC_BROWSER_TEST_F(KioskTest, KioskEnableAbortedWithAutoEnrollment) {
CHECK(wizard_controller);
// Check Kiosk mode status.
- EXPECT_EQ(KioskAppManager::CONSUMER_KIOSK_MODE_CONFIGURABLE,
+ EXPECT_EQ(KioskAppManager::CONSUMER_KIOSK_AUTO_LAUNCH_CONFIGURABLE,
GetConsumerKioskModeStatus());
wizard_controller->SkipToLoginForTesting(LoginScreenContext());
@@ -730,7 +732,7 @@ IN_PROC_BROWSER_TEST_F(KioskTest, KioskEnableAfter2ndSigninScreen) {
CHECK(wizard_controller);
// Check Kiosk mode status.
- EXPECT_EQ(KioskAppManager::CONSUMER_KIOSK_MODE_CONFIGURABLE,
+ EXPECT_EQ(KioskAppManager::CONSUMER_KIOSK_AUTO_LAUNCH_CONFIGURABLE,
GetConsumerKioskModeStatus());
// Wait for the login UI to come up and switch to the kiosk_enable screen.

Powered by Google App Engine
This is Rietveld 408576698