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

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

Issue 856493004: Update {virtual,override,final} to follow C++11 style in chrome/browser/chromeos/login. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « chrome/browser/chromeos/login/wizard_controller.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 const char kDisabledMessage[] = "This device has been disabled."; 108 const char kDisabledMessage[] = "This device has been disabled.";
109 109
110 // Matches on the mode parameter of an EnrollmentConfig object. 110 // Matches on the mode parameter of an EnrollmentConfig object.
111 MATCHER_P(EnrollmentModeMatches, mode, "") { 111 MATCHER_P(EnrollmentModeMatches, mode, "") {
112 return arg.mode == mode; 112 return arg.mode == mode;
113 } 113 }
114 114
115 class PrefStoreStub : public TestingPrefStore { 115 class PrefStoreStub : public TestingPrefStore {
116 public: 116 public:
117 // TestingPrefStore overrides: 117 // TestingPrefStore overrides:
118 virtual PrefReadError GetReadError() const override { 118 PrefReadError GetReadError() const override {
119 return PersistentPrefStore::PREF_READ_ERROR_JSON_PARSE; 119 return PersistentPrefStore::PREF_READ_ERROR_JSON_PARSE;
120 } 120 }
121 121
122 virtual bool IsInitializationComplete() const override { 122 bool IsInitializationComplete() const override { return true; }
123 return true;
124 }
125 123
126 private: 124 private:
127 virtual ~PrefStoreStub() {} 125 ~PrefStoreStub() override {}
128 }; 126 };
129 127
130 struct SwitchLanguageTestData { 128 struct SwitchLanguageTestData {
131 SwitchLanguageTestData() : result("", "", false), done(false) {} 129 SwitchLanguageTestData() : result("", "", false), done(false) {}
132 130
133 locale_util::LanguageSwitchResult result; 131 locale_util::LanguageSwitchResult result;
134 bool done; 132 bool done;
135 }; 133 };
136 134
137 void OnLocaleSwitched(SwitchLanguageTestData* self, 135 void OnLocaleSwitched(SwitchLanguageTestData* self,
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 new actor_class); \ 235 new actor_class); \
238 WizardController::default_controller() \ 236 WizardController::default_controller() \
239 ->screens_[WizardController::screen_name] = make_linked_ptr(mock_var); \ 237 ->screens_[WizardController::screen_name] = make_linked_ptr(mock_var); \
240 EXPECT_CALL(*mock_var, Show()).Times(0); \ 238 EXPECT_CALL(*mock_var, Show()).Times(0); \
241 EXPECT_CALL(*mock_var, Hide()).Times(0); 239 EXPECT_CALL(*mock_var, Hide()).Times(0);
242 240
243 class WizardControllerTest : public WizardInProcessBrowserTest { 241 class WizardControllerTest : public WizardInProcessBrowserTest {
244 protected: 242 protected:
245 WizardControllerTest() : WizardInProcessBrowserTest( 243 WizardControllerTest() : WizardInProcessBrowserTest(
246 WizardController::kTestNoScreenName) {} 244 WizardController::kTestNoScreenName) {}
247 virtual ~WizardControllerTest() {} 245 ~WizardControllerTest() override {}
248 246
249 virtual void SetUpOnMainThread() override { 247 void SetUpOnMainThread() override {
250 AccessibilityManager::Get()-> 248 AccessibilityManager::Get()->
251 SetProfileForTest(ProfileHelper::GetSigninProfile()); 249 SetProfileForTest(ProfileHelper::GetSigninProfile());
252 WizardInProcessBrowserTest::SetUpOnMainThread(); 250 WizardInProcessBrowserTest::SetUpOnMainThread();
253 } 251 }
254 252
255 ErrorScreen* GetErrorScreen() { 253 ErrorScreen* GetErrorScreen() {
256 return static_cast<BaseScreenDelegate*>( 254 return static_cast<BaseScreenDelegate*>(
257 WizardController::default_controller())->GetErrorScreen(); 255 WizardController::default_controller())->GetErrorScreen();
258 } 256 }
259 257
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 // Check that output is unmuted now and at some level. 366 // Check that output is unmuted now and at some level.
369 CrasAudioHandler* cras = CrasAudioHandler::Get(); 367 CrasAudioHandler* cras = CrasAudioHandler::Get();
370 ASSERT_FALSE(cras->IsOutputMuted()); 368 ASSERT_FALSE(cras->IsOutputMuted());
371 ASSERT_EQ(WizardController::kMinAudibleOutputVolumePercent, 369 ASSERT_EQ(WizardController::kMinAudibleOutputVolumePercent,
372 cras->GetOutputVolumePercent()); 370 cras->GetOutputVolumePercent());
373 } 371 }
374 372
375 class WizardControllerTestURLFetcherFactory 373 class WizardControllerTestURLFetcherFactory
376 : public net::TestURLFetcherFactory { 374 : public net::TestURLFetcherFactory {
377 public: 375 public:
378 virtual net::URLFetcher* CreateURLFetcher( 376 net::URLFetcher* CreateURLFetcher(int id,
379 int id, 377 const GURL& url,
380 const GURL& url, 378 net::URLFetcher::RequestType request_type,
381 net::URLFetcher::RequestType request_type, 379 net::URLFetcherDelegate* d) override {
382 net::URLFetcherDelegate* d) override {
383 if (StartsWithASCII( 380 if (StartsWithASCII(
384 url.spec(), 381 url.spec(),
385 SimpleGeolocationProvider::DefaultGeolocationProviderURL().spec(), 382 SimpleGeolocationProvider::DefaultGeolocationProviderURL().spec(),
386 true)) { 383 true)) {
387 return new net::FakeURLFetcher(url, 384 return new net::FakeURLFetcher(url,
388 d, 385 d,
389 std::string(kGeolocationResponseBody), 386 std::string(kGeolocationResponseBody),
390 net::HTTP_OK, 387 net::HTTP_OK,
391 net::URLRequestStatus::SUCCESS); 388 net::URLRequestStatus::SUCCESS);
392 } 389 }
393 if (StartsWithASCII(url.spec(), 390 if (StartsWithASCII(url.spec(),
394 chromeos::DefaultTimezoneProviderURL().spec(), 391 chromeos::DefaultTimezoneProviderURL().spec(),
395 true)) { 392 true)) {
396 return new net::FakeURLFetcher(url, 393 return new net::FakeURLFetcher(url,
397 d, 394 d,
398 std::string(kTimezoneResponseBody), 395 std::string(kTimezoneResponseBody),
399 net::HTTP_OK, 396 net::HTTP_OK,
400 net::URLRequestStatus::SUCCESS); 397 net::URLRequestStatus::SUCCESS);
401 } 398 }
402 return net::TestURLFetcherFactory::CreateURLFetcher( 399 return net::TestURLFetcherFactory::CreateURLFetcher(
403 id, url, request_type, d); 400 id, url, request_type, d);
404 } 401 }
405 virtual ~WizardControllerTestURLFetcherFactory() {} 402 ~WizardControllerTestURLFetcherFactory() override {}
406 }; 403 };
407 404
408 class TimeZoneTestRunner { 405 class TimeZoneTestRunner {
409 public: 406 public:
410 void OnResolved() { loop_.Quit(); } 407 void OnResolved() { loop_.Quit(); }
411 void Run() { loop_.Run(); } 408 void Run() { loop_.Run(); }
412 409
413 private: 410 private:
414 base::RunLoop loop_; 411 base::RunLoop loop_;
415 }; 412 };
416 413
417 class WizardControllerFlowTest : public WizardControllerTest { 414 class WizardControllerFlowTest : public WizardControllerTest {
418 protected: 415 protected:
419 WizardControllerFlowTest() {} 416 WizardControllerFlowTest() {}
420 // Overriden from InProcessBrowserTest: 417 // Overriden from InProcessBrowserTest:
421 virtual void SetUpOnMainThread() override { 418 void SetUpOnMainThread() override {
422 WizardControllerTest::SetUpOnMainThread(); 419 WizardControllerTest::SetUpOnMainThread();
423 420
424 // Make sure that OOBE is run as an "official" build. 421 // Make sure that OOBE is run as an "official" build.
425 WizardController* wizard_controller = 422 WizardController* wizard_controller =
426 WizardController::default_controller(); 423 WizardController::default_controller();
427 wizard_controller->is_official_build_ = true; 424 wizard_controller->is_official_build_ = true;
428 425
429 // Clear portal list (as it is by default in OOBE). 426 // Clear portal list (as it is by default in OOBE).
430 NetworkHandler::Get()->network_state_handler()->SetCheckPortalList(""); 427 NetworkHandler::Get()->network_state_handler()->SetCheckPortalList("");
431 428
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 EXPECT_CALL(*mock_network_screen_, Show()).Times(1); 468 EXPECT_CALL(*mock_network_screen_, Show()).Times(1);
472 wizard_controller->AdvanceToScreen(WizardController::kNetworkScreenName); 469 wizard_controller->AdvanceToScreen(WizardController::kNetworkScreenName);
473 } 470 }
474 471
475 void TearDownOnMainThread() override { 472 void TearDownOnMainThread() override {
476 mock_network_screen_.reset(); 473 mock_network_screen_.reset();
477 device_disabled_screen_actor_.reset(); 474 device_disabled_screen_actor_.reset();
478 WizardControllerTest::TearDownOnMainThread(); 475 WizardControllerTest::TearDownOnMainThread();
479 } 476 }
480 477
481 virtual void TearDown() { 478 void TearDown() override {
482 if (fallback_fetcher_factory_) { 479 if (fallback_fetcher_factory_) {
483 fetcher_factory_.reset(); 480 fetcher_factory_.reset();
484 net::URLFetcherImpl::set_factory(fallback_fetcher_factory_.get()); 481 net::URLFetcherImpl::set_factory(fallback_fetcher_factory_.get());
485 fallback_fetcher_factory_.reset(); 482 fallback_fetcher_factory_.reset();
486 } 483 }
487 } 484 }
488 485
489 void InitTimezoneResolver() { 486 void InitTimezoneResolver() {
490 fallback_fetcher_factory_.reset(new WizardControllerTestURLFetcherFactory); 487 fallback_fetcher_factory_.reset(new WizardControllerTestURLFetcherFactory);
491 net::URLFetcherImpl::set_factory(NULL); 488 net::URLFetcherImpl::set_factory(NULL);
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 WizardControllerDeviceStateTest() 732 WizardControllerDeviceStateTest()
736 : install_attributes_(std::string(), 733 : install_attributes_(std::string(),
737 std::string(), 734 std::string(),
738 std::string(), 735 std::string(),
739 policy::DEVICE_MODE_NOT_SET) { 736 policy::DEVICE_MODE_NOT_SET) {
740 fake_statistics_provider_.SetMachineStatistic("serial_number", "test"); 737 fake_statistics_provider_.SetMachineStatistic("serial_number", "test");
741 fake_statistics_provider_.SetMachineStatistic(system::kActivateDateKey, 738 fake_statistics_provider_.SetMachineStatistic(system::kActivateDateKey,
742 "2000-01"); 739 "2000-01");
743 } 740 }
744 741
745 virtual void SetUpCommandLine(base::CommandLine* command_line) override { 742 void SetUpCommandLine(base::CommandLine* command_line) override {
746 WizardControllerFlowTest::SetUpCommandLine(command_line); 743 WizardControllerFlowTest::SetUpCommandLine(command_line);
747 744
748 command_line->AppendSwitchASCII( 745 command_line->AppendSwitchASCII(
749 switches::kEnterpriseEnableForcedReEnrollment, 746 switches::kEnterpriseEnableForcedReEnrollment,
750 chromeos::AutoEnrollmentController::kForcedReEnrollmentAlways); 747 chromeos::AutoEnrollmentController::kForcedReEnrollmentAlways);
751 command_line->AppendSwitchASCII( 748 command_line->AppendSwitchASCII(
752 switches::kEnterpriseEnrollmentInitialModulus, "1"); 749 switches::kEnterpriseEnrollmentInitialModulus, "1");
753 command_line->AppendSwitchASCII( 750 command_line->AppendSwitchASCII(
754 switches::kEnterpriseEnrollmentModulusLimit, "2"); 751 switches::kEnterpriseEnrollmentModulusLimit, "2");
755 } 752 }
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
904 901
905 EXPECT_FALSE(StartupUtils::IsOobeCompleted()); 902 EXPECT_FALSE(StartupUtils::IsOobeCompleted());
906 } 903 }
907 904
908 class WizardControllerBrokenLocalStateTest : public WizardControllerTest { 905 class WizardControllerBrokenLocalStateTest : public WizardControllerTest {
909 protected: 906 protected:
910 WizardControllerBrokenLocalStateTest() 907 WizardControllerBrokenLocalStateTest()
911 : fake_session_manager_client_(NULL) { 908 : fake_session_manager_client_(NULL) {
912 } 909 }
913 910
914 virtual ~WizardControllerBrokenLocalStateTest() {} 911 ~WizardControllerBrokenLocalStateTest() override {}
915 912
916 virtual void SetUpInProcessBrowserTestFixture() override { 913 void SetUpInProcessBrowserTestFixture() override {
917 WizardControllerTest::SetUpInProcessBrowserTestFixture(); 914 WizardControllerTest::SetUpInProcessBrowserTestFixture();
918 915
919 fake_session_manager_client_ = new FakeSessionManagerClient; 916 fake_session_manager_client_ = new FakeSessionManagerClient;
920 DBusThreadManager::GetSetterForTesting()->SetSessionManagerClient( 917 DBusThreadManager::GetSetterForTesting()->SetSessionManagerClient(
921 scoped_ptr<SessionManagerClient>(fake_session_manager_client_)); 918 scoped_ptr<SessionManagerClient>(fake_session_manager_client_));
922 } 919 }
923 920
924 virtual void SetUpOnMainThread() override { 921 void SetUpOnMainThread() override {
925 base::PrefServiceFactory factory; 922 base::PrefServiceFactory factory;
926 factory.set_user_prefs(make_scoped_refptr(new PrefStoreStub())); 923 factory.set_user_prefs(make_scoped_refptr(new PrefStoreStub()));
927 local_state_ = factory.Create(new PrefRegistrySimple()).Pass(); 924 local_state_ = factory.Create(new PrefRegistrySimple()).Pass();
928 WizardController::set_local_state_for_testing(local_state_.get()); 925 WizardController::set_local_state_for_testing(local_state_.get());
929 926
930 WizardControllerTest::SetUpOnMainThread(); 927 WizardControllerTest::SetUpOnMainThread();
931 928
932 // Make sure that OOBE is run as an "official" build. 929 // Make sure that OOBE is run as an "official" build.
933 WizardController::default_controller()->is_official_build_ = true; 930 WizardController::default_controller()->is_official_build_ = true;
934 } 931 }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
970 ASSERT_EQ(1, fake_session_manager_client()->start_device_wipe_call_count()); 967 ASSERT_EQ(1, fake_session_manager_client()->start_device_wipe_call_count());
971 } 968 }
972 969
973 class WizardControllerProxyAuthOnSigninTest : public WizardControllerTest { 970 class WizardControllerProxyAuthOnSigninTest : public WizardControllerTest {
974 protected: 971 protected:
975 WizardControllerProxyAuthOnSigninTest() 972 WizardControllerProxyAuthOnSigninTest()
976 : proxy_server_(net::SpawnedTestServer::TYPE_BASIC_AUTH_PROXY, 973 : proxy_server_(net::SpawnedTestServer::TYPE_BASIC_AUTH_PROXY,
977 net::SpawnedTestServer::kLocalhost, 974 net::SpawnedTestServer::kLocalhost,
978 base::FilePath()) { 975 base::FilePath()) {
979 } 976 }
980 virtual ~WizardControllerProxyAuthOnSigninTest() {} 977 ~WizardControllerProxyAuthOnSigninTest() override {}
981 978
982 // Overridden from WizardControllerTest: 979 // Overridden from WizardControllerTest:
983 virtual void SetUp() override { 980 void SetUp() override {
984 ASSERT_TRUE(proxy_server_.Start()); 981 ASSERT_TRUE(proxy_server_.Start());
985 WizardControllerTest::SetUp(); 982 WizardControllerTest::SetUp();
986 } 983 }
987 984
988 virtual void SetUpOnMainThread() override { 985 void SetUpOnMainThread() override {
989 WizardControllerTest::SetUpOnMainThread(); 986 WizardControllerTest::SetUpOnMainThread();
990 WizardController::default_controller()->AdvanceToScreen( 987 WizardController::default_controller()->AdvanceToScreen(
991 WizardController::kNetworkScreenName); 988 WizardController::kNetworkScreenName);
992 } 989 }
993 990
994 virtual void SetUpCommandLine(base::CommandLine* command_line) override { 991 void SetUpCommandLine(base::CommandLine* command_line) override {
995 command_line->AppendSwitchASCII(::switches::kProxyServer, 992 command_line->AppendSwitchASCII(::switches::kProxyServer,
996 proxy_server_.host_port_pair().ToString()); 993 proxy_server_.host_port_pair().ToString());
997 } 994 }
998 995
999 net::SpawnedTestServer& proxy_server() { return proxy_server_; } 996 net::SpawnedTestServer& proxy_server() { return proxy_server_; }
1000 997
1001 private: 998 private:
1002 net::SpawnedTestServer proxy_server_; 999 net::SpawnedTestServer proxy_server_;
1003 1000
1004 DISALLOW_COPY_AND_ASSIGN(WizardControllerProxyAuthOnSigninTest); 1001 DISALLOW_COPY_AND_ASSIGN(WizardControllerProxyAuthOnSigninTest);
1005 }; 1002 };
1006 1003
1007 IN_PROC_BROWSER_TEST_F(WizardControllerProxyAuthOnSigninTest, 1004 IN_PROC_BROWSER_TEST_F(WizardControllerProxyAuthOnSigninTest,
1008 ProxyAuthDialogOnSigninScreen) { 1005 ProxyAuthDialogOnSigninScreen) {
1009 content::WindowedNotificationObserver auth_needed_waiter( 1006 content::WindowedNotificationObserver auth_needed_waiter(
1010 chrome::NOTIFICATION_AUTH_NEEDED, 1007 chrome::NOTIFICATION_AUTH_NEEDED,
1011 content::NotificationService::AllSources()); 1008 content::NotificationService::AllSources());
1012 1009
1013 CheckCurrentScreen(WizardController::kNetworkScreenName); 1010 CheckCurrentScreen(WizardController::kNetworkScreenName);
1014 1011
1015 LoginDisplayHostImpl::default_host()->StartSignInScreen(LoginScreenContext()); 1012 LoginDisplayHostImpl::default_host()->StartSignInScreen(LoginScreenContext());
1016 auth_needed_waiter.Wait(); 1013 auth_needed_waiter.Wait();
1017 } 1014 }
1018 1015
1019 class WizardControllerKioskFlowTest : public WizardControllerFlowTest { 1016 class WizardControllerKioskFlowTest : public WizardControllerFlowTest {
1020 protected: 1017 protected:
1021 WizardControllerKioskFlowTest() {} 1018 WizardControllerKioskFlowTest() {}
1022 1019
1023 // Overridden from InProcessBrowserTest: 1020 // Overridden from InProcessBrowserTest:
1024 virtual void SetUpCommandLine(base::CommandLine* command_line) override { 1021 void SetUpCommandLine(base::CommandLine* command_line) override {
1025 base::FilePath test_data_dir; 1022 base::FilePath test_data_dir;
1026 ASSERT_TRUE(chromeos::test_utils::GetTestDataPath( 1023 ASSERT_TRUE(chromeos::test_utils::GetTestDataPath(
1027 "app_mode", "kiosk_manifest", &test_data_dir)); 1024 "app_mode", "kiosk_manifest", &test_data_dir));
1028 command_line->AppendSwitchPath( 1025 command_line->AppendSwitchPath(
1029 switches::kAppOemManifestFile, 1026 switches::kAppOemManifestFile,
1030 test_data_dir.AppendASCII("kiosk_manifest.json")); 1027 test_data_dir.AppendASCII("kiosk_manifest.json"));
1031 } 1028 }
1032 1029
1033 private: 1030 private:
1034 DISALLOW_COPY_AND_ASSIGN(WizardControllerKioskFlowTest); 1031 DISALLOW_COPY_AND_ASSIGN(WizardControllerKioskFlowTest);
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
1121 CheckCurrentScreen(WizardController::kAutoEnrollmentCheckScreenName); 1118 CheckCurrentScreen(WizardController::kAutoEnrollmentCheckScreenName);
1122 EXPECT_FALSE(StartupUtils::IsOobeCompleted()); 1119 EXPECT_FALSE(StartupUtils::IsOobeCompleted());
1123 } 1120 }
1124 1121
1125 1122
1126 class WizardControllerEnableDebuggingTest : public WizardControllerFlowTest { 1123 class WizardControllerEnableDebuggingTest : public WizardControllerFlowTest {
1127 protected: 1124 protected:
1128 WizardControllerEnableDebuggingTest() {} 1125 WizardControllerEnableDebuggingTest() {}
1129 1126
1130 // Overridden from InProcessBrowserTest: 1127 // Overridden from InProcessBrowserTest:
1131 virtual void SetUpCommandLine(base::CommandLine* command_line) override { 1128 void SetUpCommandLine(base::CommandLine* command_line) override {
1132 WizardControllerFlowTest::SetUpCommandLine(command_line); 1129 WizardControllerFlowTest::SetUpCommandLine(command_line);
1133 command_line->AppendSwitch(chromeos::switches::kSystemDevMode); 1130 command_line->AppendSwitch(chromeos::switches::kSystemDevMode);
1134 } 1131 }
1135 1132
1136 private: 1133 private:
1137 DISALLOW_COPY_AND_ASSIGN(WizardControllerEnableDebuggingTest); 1134 DISALLOW_COPY_AND_ASSIGN(WizardControllerEnableDebuggingTest);
1138 }; 1135 };
1139 1136
1140 IN_PROC_BROWSER_TEST_F(WizardControllerEnableDebuggingTest, 1137 IN_PROC_BROWSER_TEST_F(WizardControllerEnableDebuggingTest,
1141 ShowAndCancelEnableDebugging) { 1138 ShowAndCancelEnableDebugging) {
(...skipping 18 matching lines...) Expand all
1160 // Let update screen smooth time process (time = 0ms). 1157 // Let update screen smooth time process (time = 0ms).
1161 content::RunAllPendingInMessageLoop(); 1158 content::RunAllPendingInMessageLoop();
1162 1159
1163 CheckCurrentScreen(WizardController::kNetworkScreenName); 1160 CheckCurrentScreen(WizardController::kNetworkScreenName);
1164 } 1161 }
1165 1162
1166 class WizardControllerOobeResumeTest : public WizardControllerTest { 1163 class WizardControllerOobeResumeTest : public WizardControllerTest {
1167 protected: 1164 protected:
1168 WizardControllerOobeResumeTest() {} 1165 WizardControllerOobeResumeTest() {}
1169 // Overriden from InProcessBrowserTest: 1166 // Overriden from InProcessBrowserTest:
1170 virtual void SetUpOnMainThread() override { 1167 void SetUpOnMainThread() override {
1171 WizardControllerTest::SetUpOnMainThread(); 1168 WizardControllerTest::SetUpOnMainThread();
1172 1169
1173 // Make sure that OOBE is run as an "official" build. 1170 // Make sure that OOBE is run as an "official" build.
1174 WizardController::default_controller()->is_official_build_ = true; 1171 WizardController::default_controller()->is_official_build_ = true;
1175 1172
1176 // Clear portal list (as it is by default in OOBE). 1173 // Clear portal list (as it is by default in OOBE).
1177 NetworkHandler::Get()->network_state_handler()->SetCheckPortalList(""); 1174 NetworkHandler::Get()->network_state_handler()->SetCheckPortalList("");
1178 1175
1179 // Set up the mocks for all screens. 1176 // Set up the mocks for all screens.
1180 MOCK_WITH_DELEGATE(mock_network_screen_, kNetworkScreenName, 1177 MOCK_WITH_DELEGATE(mock_network_screen_, kNetworkScreenName,
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
1234 // TODO(merkulova): Add tests for bluetooth HID detection screen variations when 1231 // TODO(merkulova): Add tests for bluetooth HID detection screen variations when
1235 // UI and logic is ready. http://crbug.com/127016 1232 // UI and logic is ready. http://crbug.com/127016
1236 1233
1237 // TODO(dzhioev): Add tests for controller/host pairing flow. 1234 // TODO(dzhioev): Add tests for controller/host pairing flow.
1238 // http://crbug.com/375191 1235 // http://crbug.com/375191
1239 1236
1240 static_assert(BaseScreenDelegate::EXIT_CODES_COUNT == 24, 1237 static_assert(BaseScreenDelegate::EXIT_CODES_COUNT == 24,
1241 "tests for new control flow are missing"); 1238 "tests for new control flow are missing");
1242 1239
1243 } // namespace chromeos 1240 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/wizard_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698