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

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

Issue 306993004: Remove the option to skip auto-update checks on OOBE. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/prefs/pref_registry_simple.h" 9 #include "base/prefs/pref_registry_simple.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 EXPECT_EQ(WizardController::default_controller()->GetUpdateScreen(), 543 EXPECT_EQ(WizardController::default_controller()->GetUpdateScreen(),
544 WizardController::default_controller()->current_screen()); 544 WizardController::default_controller()->current_screen());
545 EXPECT_CALL(*mock_update_screen_, Hide()).Times(0); 545 EXPECT_CALL(*mock_update_screen_, Hide()).Times(0);
546 EXPECT_CALL(*mock_eula_screen_, Show()).Times(0); 546 EXPECT_CALL(*mock_eula_screen_, Show()).Times(0);
547 EXPECT_CALL(*mock_eula_screen_, Hide()).Times(0); // last transition 547 EXPECT_CALL(*mock_eula_screen_, Hide()).Times(0); // last transition
548 OnExit(ScreenObserver::UPDATE_ERROR_UPDATING); 548 OnExit(ScreenObserver::UPDATE_ERROR_UPDATING);
549 549
550 EXPECT_FALSE(ExistingUserController::current_controller() == NULL); 550 EXPECT_FALSE(ExistingUserController::current_controller() == NULL);
551 } 551 }
552 552
553 IN_PROC_BROWSER_TEST_F(WizardControllerFlowTest, ControlFlowSkipUpdateEnroll) {
554 EXPECT_EQ(WizardController::default_controller()->GetNetworkScreen(),
555 WizardController::default_controller()->current_screen());
556 EXPECT_CALL(*mock_update_screen_, StartNetworkCheck()).Times(0);
557 EXPECT_CALL(*mock_eula_screen_, Show()).Times(1);
558 EXPECT_CALL(*mock_update_screen_, Show()).Times(0);
559 EXPECT_CALL(*mock_network_screen_, Hide()).Times(1);
560 OnExit(ScreenObserver::NETWORK_CONNECTED);
561
562 EXPECT_EQ(WizardController::default_controller()->GetEulaScreen(),
563 WizardController::default_controller()->current_screen());
564 EXPECT_CALL(*mock_eula_screen_, Hide()).Times(1);
565 EXPECT_CALL(*mock_update_screen_, StartNetworkCheck()).Times(0);
566 EXPECT_CALL(*mock_update_screen_, Show()).Times(0);
567 WizardController::default_controller()->SkipUpdateEnrollAfterEula();
568 EXPECT_CALL(*mock_enrollment_screen_->actor(),
569 SetParameters(mock_enrollment_screen_,
570 EnrollmentScreenActor::ENROLLMENT_MODE_MANUAL,
571 ""))
572 .Times(1);
573 EXPECT_CALL(*mock_enrollment_screen_, Show()).Times(1);
574 EXPECT_CALL(*mock_enrollment_screen_, Hide()).Times(0);
575 OnExit(ScreenObserver::EULA_ACCEPTED);
576 content::RunAllPendingInMessageLoop();
577
578 EXPECT_EQ(WizardController::default_controller()->GetEnrollmentScreen(),
579 WizardController::default_controller()->current_screen());
580 EXPECT_TRUE(ExistingUserController::current_controller() == NULL);
581 EXPECT_EQ("ethernet,wifi,cellular",
582 NetworkHandler::Get()->network_state_handler()
583 ->GetCheckPortalListForTest());
584 }
585
586 IN_PROC_BROWSER_TEST_F(WizardControllerFlowTest, ControlFlowEulaDeclined) { 553 IN_PROC_BROWSER_TEST_F(WizardControllerFlowTest, ControlFlowEulaDeclined) {
587 EXPECT_EQ(WizardController::default_controller()->GetNetworkScreen(), 554 EXPECT_EQ(WizardController::default_controller()->GetNetworkScreen(),
588 WizardController::default_controller()->current_screen()); 555 WizardController::default_controller()->current_screen());
589 EXPECT_CALL(*mock_update_screen_, StartNetworkCheck()).Times(0); 556 EXPECT_CALL(*mock_update_screen_, StartNetworkCheck()).Times(0);
590 EXPECT_CALL(*mock_eula_screen_, Show()).Times(1); 557 EXPECT_CALL(*mock_eula_screen_, Show()).Times(1);
591 EXPECT_CALL(*mock_network_screen_, Hide()).Times(1); 558 EXPECT_CALL(*mock_network_screen_, Hide()).Times(1);
592 OnExit(ScreenObserver::NETWORK_CONNECTED); 559 OnExit(ScreenObserver::NETWORK_CONNECTED);
593 560
594 EXPECT_EQ(WizardController::default_controller()->GetEulaScreen(), 561 EXPECT_EQ(WizardController::default_controller()->GetEulaScreen(),
595 WizardController::default_controller()->current_screen()); 562 WizardController::default_controller()->current_screen());
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
1044 1011
1045 // TODO(nkostylev): Add test for WebUI accelerators http://crosbug.com/22571 1012 // TODO(nkostylev): Add test for WebUI accelerators http://crosbug.com/22571
1046 1013
1047 // TODO(merkulova): Add tests for bluetooth HID detection screen variations when 1014 // TODO(merkulova): Add tests for bluetooth HID detection screen variations when
1048 // UI and logic is ready. http://crbug.com/127016 1015 // UI and logic is ready. http://crbug.com/127016
1049 1016
1050 COMPILE_ASSERT(ScreenObserver::EXIT_CODES_COUNT == 21, 1017 COMPILE_ASSERT(ScreenObserver::EXIT_CODES_COUNT == 21,
1051 add_tests_for_new_control_flow_you_just_introduced); 1018 add_tests_for_new_control_flow_you_just_introduced);
1052 1019
1053 } // namespace chromeos 1020 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/wizard_controller.cc ('k') | chrome/browser/resources/login/display_manager.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698