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

Unified Diff: chrome/browser/chromeos/login/app_launch_controller.h

Issue 23449023: Add kiosk browser tests for network configuration. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix flakiness Created 7 years, 3 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/app_launch_controller.h
diff --git a/chrome/browser/chromeos/login/app_launch_controller.h b/chrome/browser/chromeos/login/app_launch_controller.h
index 0f3d60663956f9be15e13bfaa2cb7b983049f7b3..ab681bbf7c0d05bce3c6159fd3d39ba6787bf04c 100644
--- a/chrome/browser/chromeos/login/app_launch_controller.h
+++ b/chrome/browser/chromeos/login/app_launch_controller.h
@@ -8,6 +8,7 @@
#include <string>
#include "base/basictypes.h"
+#include "base/callback_forward.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "base/timer/timer.h"
@@ -24,6 +25,7 @@ namespace chromeos {
class LoginDisplayHost;
class OobeDisplay;
+class UserManager;
// Controller for the kiosk app launch process, responsible for
// coordinating loading the kiosk profile, launching the app, and
@@ -43,11 +45,20 @@ class AppLaunchController
void StartAppLaunch();
+ bool waiting_for_network() { return waiting_for_network_; }
+ bool network_wait_timedout() { return network_wait_timedout_; }
+ bool showing_network_dialog() { return showing_network_dialog_; }
+
+ // Customize controller for testing purposes.
static void SkipSplashWaitForTesting();
+ static void SetNetworkTimeoutCallbackForTesting(base::Closure* callback);
+ static void SetNetworkWaitForTesting(int wait_time_secs);
+ static void SetUserManagerForTesting(UserManager* user_manager);
private:
void Cleanup();
void OnNetworkWaitTimedout();
+ UserManager* GetUserManager();
// KioskProfileLoader::Delegate overrides:
virtual void OnProfileLoaded(Profile* profile) OVERRIDE;
@@ -80,10 +91,14 @@ class AppLaunchController
base::OneShotTimer<AppLaunchController> network_wait_timer_;
bool waiting_for_network_;
+ bool network_wait_timedout_;
bool showing_network_dialog_;
int64 launch_splash_start_time_;
static bool skip_splash_wait_;
+ static int network_wait_time_;
+ static base::Closure* network_timeout_callback_;
+ static UserManager* test_user_manager_;
DISALLOW_COPY_AND_ASSIGN(AppLaunchController);
};
« no previous file with comments | « chrome/browser/chromeos/app_mode/startup_app_launcher.cc ('k') | chrome/browser/chromeos/login/app_launch_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698