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

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

Issue 2771803003: Don't start FRE from the login screen (Closed)
Patch Set: Improve comments Created 3 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/wizard_controller_browsertest.cc
diff --git a/chrome/browser/chromeos/login/wizard_controller_browsertest.cc b/chrome/browser/chromeos/login/wizard_controller_browsertest.cc
index f5d129757d174e46c9e97ac0e4616050a0af94ae..39e7bfe4e68f418bb4251675df7c333863940210 100644
--- a/chrome/browser/chromeos/login/wizard_controller_browsertest.cc
+++ b/chrome/browser/chromeos/login/wizard_controller_browsertest.cc
@@ -16,6 +16,7 @@
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
#include "chrome/browser/chromeos/base/locale_util.h"
+#include "chrome/browser/chromeos/login/enrollment/auto_enrollment_controller.h"
#include "chrome/browser/chromeos/login/enrollment/enrollment_screen.h"
#include "chrome/browser/chromeos/login/enrollment/enterprise_enrollment_helper.h"
#include "chrome/browser/chromeos/login/enrollment/mock_auto_enrollment_check_screen.h"
@@ -181,17 +182,6 @@ void QuitLoopOnAutoEnrollmentProgress(
loop->Quit();
}
-void WaitForAutoEnrollmentState(policy::AutoEnrollmentState state) {
- base::RunLoop loop;
- AutoEnrollmentController* auto_enrollment_controller =
- LoginDisplayHost::default_host()->GetAutoEnrollmentController();
- std::unique_ptr<AutoEnrollmentController::ProgressCallbackList::Subscription>
- progress_subscription(
- auto_enrollment_controller->RegisterProgressCallback(
- base::Bind(&QuitLoopOnAutoEnrollmentProgress, state, &loop)));
- loop.Run();
-}
-
} // namespace
using ::testing::_;
@@ -828,6 +818,18 @@ class WizardControllerDeviceStateTest : public WizardControllerFlowTest {
system::kActivateDateKey, "2000-01");
}
+ static void WaitForAutoEnrollmentState(policy::AutoEnrollmentState state) {
+ base::RunLoop loop;
+ std::unique_ptr<
+ AutoEnrollmentController::ProgressCallbackList::Subscription>
+ progress_subscription(
+ WizardController::default_controller()
+ ->GetAutoEnrollmentController()
+ ->RegisterProgressCallback(base::Bind(
+ &QuitLoopOnAutoEnrollmentProgress, state, &loop)));
+ loop.Run();
+ }
+
void SetUpCommandLine(base::CommandLine* command_line) override {
WizardControllerFlowTest::SetUpCommandLine(command_line);
@@ -907,9 +909,10 @@ IN_PROC_BROWSER_TEST_F(WizardControllerDeviceStateTest,
IN_PROC_BROWSER_TEST_F(WizardControllerDeviceStateTest,
ControlFlowNoForcedReEnrollmentOnFirstBoot) {
fake_statistics_provider_.ClearMachineStatistic(system::kActivateDateKey);
- EXPECT_NE(
- policy::AUTO_ENROLLMENT_STATE_NO_ENROLLMENT,
- LoginDisplayHost::default_host()->GetAutoEnrollmentController()->state());
+ EXPECT_NE(policy::AUTO_ENROLLMENT_STATE_NO_ENROLLMENT,
+ WizardController::default_controller()
+ ->GetAutoEnrollmentController()
+ ->state());
CheckCurrentScreen(OobeScreen::SCREEN_OOBE_NETWORK);
EXPECT_CALL(*mock_network_screen_, Hide()).Times(1);
@@ -932,9 +935,10 @@ IN_PROC_BROWSER_TEST_F(WizardControllerDeviceStateTest,
CheckCurrentScreen(OobeScreen::SCREEN_AUTO_ENROLLMENT_CHECK);
mock_auto_enrollment_check_screen_->RealShow();
- EXPECT_EQ(
- policy::AUTO_ENROLLMENT_STATE_NO_ENROLLMENT,
- LoginDisplayHost::default_host()->GetAutoEnrollmentController()->state());
+ EXPECT_EQ(policy::AUTO_ENROLLMENT_STATE_NO_ENROLLMENT,
+ WizardController::default_controller()
+ ->GetAutoEnrollmentController()
+ ->state());
}
IN_PROC_BROWSER_TEST_F(WizardControllerDeviceStateTest,
@@ -1325,7 +1329,7 @@ IN_PROC_BROWSER_TEST_F(WizardControllerCellularFirstTest, CellularFirstFlow) {
TestControlFlowMain();
}
-// TODO(dzhioev): Add test emaulating device with wrong HWID.
+// TODO(dzhioev): Add test emulating device with wrong HWID.
// TODO(nkostylev): Add test for WebUI accelerators http://crosbug.com/22571
« no previous file with comments | « chrome/browser/chromeos/login/wizard_controller.cc ('k') | chrome/browser/chromeos/policy/auto_enrollment_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698