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

Unified Diff: chrome/browser/chromeos/app_mode/kiosk_app_manager_browsertest.cc

Issue 900553006: Updated KioskAppManager to track whether an app was auto-launched. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed review comments. Created 5 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/app_mode/kiosk_app_manager_browsertest.cc
diff --git a/chrome/browser/chromeos/app_mode/kiosk_app_manager_browsertest.cc b/chrome/browser/chromeos/app_mode/kiosk_app_manager_browsertest.cc
index b90f73b5afa41eae57e3c3f9616533faf09b9c77..5a2cd61534fd82fdac0964e83dedf3beb35f233f 100644
--- a/chrome/browser/chromeos/app_mode/kiosk_app_manager_browsertest.cc
+++ b/chrome/browser/chromeos/app_mode/kiosk_app_manager_browsertest.cc
@@ -361,11 +361,26 @@ IN_PROC_BROWSER_TEST_F(KioskAppManagerTest, Basic) {
manager()->SetAutoLaunchApp("fake_app_1");
EXPECT_EQ("fake_app_1", manager()->GetAutoLaunchApp());
+ // Make sure that if an app was auto launched, it is reflected in the
bartfab (slow) 2015/02/06 14:14:08 Nit: "with zero delay"
Andrew T Wilson (Slow) 2015/02/06 20:43:50 Done.
+ // app data.
+ KioskAppManager::App app;
+ manager()->GetApp("fake_app_1", &app);
+ EXPECT_FALSE(app.was_auto_launched_with_zero_delay);
+
+ manager()->SetAppWasAutoLaunchedWithZeroDelay("fake_app_1");
+ manager()->GetApp("fake_app_1", &app);
+ EXPECT_TRUE(app.was_auto_launched_with_zero_delay);
+
// Clear the auto launch app.
manager()->SetAutoLaunchApp("");
EXPECT_EQ("", manager()->GetAutoLaunchApp());
EXPECT_FALSE(manager()->IsAutoLaunchEnabled());
+ // App should still report it was auto launched even though it is no longer
bartfab (slow) 2015/02/06 14:14:07 Nit: "with zero delay"
Andrew T Wilson (Slow) 2015/02/06 20:43:50 Done.
+ // set to auto launch in the future.
+ manager()->GetApp("fake_app_1", &app);
+ EXPECT_TRUE(app.was_auto_launched_with_zero_delay);
+
// Set another auto launch app.
manager()->SetAutoLaunchApp("fake_app_2");
EXPECT_EQ("fake_app_2", manager()->GetAutoLaunchApp());

Powered by Google App Engine
This is Rietveld 408576698