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

Side by Side Diff: chrome/browser/chromeos/login/wizard_controller_browsertest.cc

Issue 692383005: Add DeviceDisablingManager to manage device disabling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@f_3_425574_disable_header_bar
Patch Set: Add destructor required by clang. Created 6 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/login/wizard_controller.h" 5 #include "chrome/browser/chromeos/login/wizard_controller.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/prefs/pref_registry_simple.h" 10 #include "base/prefs/pref_registry_simple.h"
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 559
560 // Let update screen smooth time process (time = 0ms). 560 // Let update screen smooth time process (time = 0ms).
561 content::RunAllPendingInMessageLoop(); 561 content::RunAllPendingInMessageLoop();
562 562
563 CheckCurrentScreen(WizardController::kUpdateScreenName); 563 CheckCurrentScreen(WizardController::kUpdateScreenName);
564 EXPECT_CALL(*mock_update_screen_, Hide()).Times(1); 564 EXPECT_CALL(*mock_update_screen_, Hide()).Times(1);
565 EXPECT_CALL(*mock_auto_enrollment_check_screen_, Show()).Times(1); 565 EXPECT_CALL(*mock_auto_enrollment_check_screen_, Show()).Times(1);
566 OnExit(BaseScreenDelegate::UPDATE_INSTALLED); 566 OnExit(BaseScreenDelegate::UPDATE_INSTALLED);
567 567
568 CheckCurrentScreen(WizardController::kAutoEnrollmentCheckScreenName); 568 CheckCurrentScreen(WizardController::kAutoEnrollmentCheckScreenName);
569 EXPECT_CALL(*mock_auto_enrollment_check_screen_, Hide()).Times(1); 569 EXPECT_CALL(*mock_auto_enrollment_check_screen_, Hide()).Times(0);
570 EXPECT_CALL(*mock_eula_screen_, Show()).Times(0); 570 EXPECT_CALL(*mock_eula_screen_, Show()).Times(0);
571 OnExit(BaseScreenDelegate::ENTERPRISE_AUTO_ENROLLMENT_CHECK_COMPLETED); 571 OnExit(BaseScreenDelegate::ENTERPRISE_AUTO_ENROLLMENT_CHECK_COMPLETED);
572 572
573 EXPECT_FALSE(ExistingUserController::current_controller() == NULL); 573 EXPECT_FALSE(ExistingUserController::current_controller() == NULL);
574 EXPECT_EQ("ethernet,wifi,cellular", 574 EXPECT_EQ("ethernet,wifi,cellular",
575 NetworkHandler::Get()->network_state_handler() 575 NetworkHandler::Get()->network_state_handler()
576 ->GetCheckPortalListForTest()); 576 ->GetCheckPortalListForTest());
577 577
578 WaitUntilTimezoneResolved(); 578 WaitUntilTimezoneResolved();
579 EXPECT_EQ("America/Anchorage", 579 EXPECT_EQ("America/Anchorage",
(...skipping 17 matching lines...) Expand all
597 597
598 // Let update screen smooth time process (time = 0ms). 598 // Let update screen smooth time process (time = 0ms).
599 content::RunAllPendingInMessageLoop(); 599 content::RunAllPendingInMessageLoop();
600 600
601 CheckCurrentScreen(WizardController::kUpdateScreenName); 601 CheckCurrentScreen(WizardController::kUpdateScreenName);
602 EXPECT_CALL(*mock_update_screen_, Hide()).Times(1); 602 EXPECT_CALL(*mock_update_screen_, Hide()).Times(1);
603 EXPECT_CALL(*mock_auto_enrollment_check_screen_, Show()).Times(1); 603 EXPECT_CALL(*mock_auto_enrollment_check_screen_, Show()).Times(1);
604 OnExit(BaseScreenDelegate::UPDATE_ERROR_UPDATING); 604 OnExit(BaseScreenDelegate::UPDATE_ERROR_UPDATING);
605 605
606 CheckCurrentScreen(WizardController::kAutoEnrollmentCheckScreenName); 606 CheckCurrentScreen(WizardController::kAutoEnrollmentCheckScreenName);
607 EXPECT_CALL(*mock_auto_enrollment_check_screen_, Hide()).Times(1); 607 EXPECT_CALL(*mock_auto_enrollment_check_screen_, Hide()).Times(0);
608 EXPECT_CALL(*mock_eula_screen_, Show()).Times(0); 608 EXPECT_CALL(*mock_eula_screen_, Show()).Times(0);
609 OnExit(BaseScreenDelegate::ENTERPRISE_AUTO_ENROLLMENT_CHECK_COMPLETED); 609 OnExit(BaseScreenDelegate::ENTERPRISE_AUTO_ENROLLMENT_CHECK_COMPLETED);
610 610
611 EXPECT_FALSE(ExistingUserController::current_controller() == NULL); 611 EXPECT_FALSE(ExistingUserController::current_controller() == NULL);
612 } 612 }
613 613
614 IN_PROC_BROWSER_TEST_F(WizardControllerFlowTest, ControlFlowSkipUpdateEnroll) { 614 IN_PROC_BROWSER_TEST_F(WizardControllerFlowTest, ControlFlowSkipUpdateEnroll) {
615 CheckCurrentScreen(WizardController::kNetworkScreenName); 615 CheckCurrentScreen(WizardController::kNetworkScreenName);
616 EXPECT_CALL(*mock_update_screen_, StartNetworkCheck()).Times(0); 616 EXPECT_CALL(*mock_update_screen_, StartNetworkCheck()).Times(0);
617 EXPECT_CALL(*mock_eula_screen_, Show()).Times(1); 617 EXPECT_CALL(*mock_eula_screen_, Show()).Times(1);
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
845 845
846 CheckCurrentScreen(WizardController::kUpdateScreenName); 846 CheckCurrentScreen(WizardController::kUpdateScreenName);
847 EXPECT_CALL(*mock_update_screen_, Hide()).Times(1); 847 EXPECT_CALL(*mock_update_screen_, Hide()).Times(1);
848 EXPECT_CALL(*mock_auto_enrollment_check_screen_, Show()).Times(1); 848 EXPECT_CALL(*mock_auto_enrollment_check_screen_, Show()).Times(1);
849 OnExit(BaseScreenDelegate::UPDATE_INSTALLED); 849 OnExit(BaseScreenDelegate::UPDATE_INSTALLED);
850 850
851 AutoEnrollmentCheckScreen* screen = 851 AutoEnrollmentCheckScreen* screen =
852 AutoEnrollmentCheckScreen::Get(WizardController::default_controller()); 852 AutoEnrollmentCheckScreen::Get(WizardController::default_controller());
853 EXPECT_EQ(screen, 853 EXPECT_EQ(screen,
854 WizardController::default_controller()->current_screen()); 854 WizardController::default_controller()->current_screen());
855 EXPECT_CALL(*mock_auto_enrollment_check_screen_, Hide()).Times(1);
856 screen->Start(); 855 screen->Start();
857 EXPECT_EQ(policy::AUTO_ENROLLMENT_STATE_NO_ENROLLMENT, 856 EXPECT_EQ(policy::AUTO_ENROLLMENT_STATE_NO_ENROLLMENT,
858 LoginDisplayHostImpl::default_host() 857 LoginDisplayHostImpl::default_host()
859 ->GetAutoEnrollmentController() 858 ->GetAutoEnrollmentController()
860 ->state()); 859 ->state());
861 } 860 }
862 861
863 IN_PROC_BROWSER_TEST_F(WizardControllerDeviceStateTest, 862 IN_PROC_BROWSER_TEST_F(WizardControllerDeviceStateTest,
864 ControlFlowDeviceDisabled) { 863 ControlFlowDeviceDisabled) {
865 CheckCurrentScreen(WizardController::kNetworkScreenName); 864 CheckCurrentScreen(WizardController::kNetworkScreenName);
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
1197 // TODO(dzhioev): Add test emaulating device with wrong HWID. 1196 // TODO(dzhioev): Add test emaulating device with wrong HWID.
1198 1197
1199 // TODO(nkostylev): Add test for WebUI accelerators http://crosbug.com/22571 1198 // TODO(nkostylev): Add test for WebUI accelerators http://crosbug.com/22571
1200 1199
1201 // TODO(merkulova): Add tests for bluetooth HID detection screen variations when 1200 // TODO(merkulova): Add tests for bluetooth HID detection screen variations when
1202 // UI and logic is ready. http://crbug.com/127016 1201 // UI and logic is ready. http://crbug.com/127016
1203 1202
1204 // TODO(dzhioev): Add tests for controller/host pairing flow. 1203 // TODO(dzhioev): Add tests for controller/host pairing flow.
1205 // http://crbug.com/375191 1204 // http://crbug.com/375191
1206 1205
1207 COMPILE_ASSERT(BaseScreenDelegate::EXIT_CODES_COUNT == 24, 1206 COMPILE_ASSERT(BaseScreenDelegate::EXIT_CODES_COUNT == 23,
1208 add_tests_for_new_control_flow_you_just_introduced); 1207 add_tests_for_new_control_flow_you_just_introduced);
1209 1208
1210 } // namespace chromeos 1209 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/wizard_controller.cc ('k') | chrome/browser/chromeos/system/device_disabling_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698