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

Side by Side Diff: chrome/browser/chromeos/login/screens/network_screen_browsertest.cc

Issue 2705363002: cros: Move BaseScreenDelegate::ExitCodes into separate file, ScreenExitCode. (Closed)
Patch Set: Rebase Created 3 years, 9 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
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/screens/network_screen.h" 5 #include "chrome/browser/chromeos/login/screens/network_screen.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 SetDefaultNetworkStateHelperExpectations(); 83 SetDefaultNetworkStateHelperExpectations();
84 network_screen_->SetNetworkStateHelperForTest(mock_network_state_helper_); 84 network_screen_->SetNetworkStateHelperForTest(mock_network_state_helper_);
85 } 85 }
86 86
87 void TearDownInProcessBrowserTestFixture() override { 87 void TearDownInProcessBrowserTestFixture() override {
88 InProcessBrowserTest::TearDownInProcessBrowserTestFixture(); 88 InProcessBrowserTest::TearDownInProcessBrowserTestFixture();
89 } 89 }
90 90
91 void EmulateContinueButtonExit(NetworkScreen* network_screen) { 91 void EmulateContinueButtonExit(NetworkScreen* network_screen) {
92 EXPECT_CALL(*mock_base_screen_delegate_, 92 EXPECT_CALL(*mock_base_screen_delegate_,
93 OnExit(_, BaseScreenDelegate::NETWORK_CONNECTED, _)).Times(1); 93 OnExit(_, ScreenExitCode::NETWORK_CONNECTED, _))
94 .Times(1);
94 EXPECT_CALL(*mock_network_state_helper_, IsConnected()) 95 EXPECT_CALL(*mock_network_state_helper_, IsConnected())
95 .WillOnce(Return(true)); 96 .WillOnce(Return(true));
96 network_screen->OnContinueButtonPressed(); 97 network_screen->OnContinueButtonPressed();
97 content::RunAllPendingInMessageLoop(); 98 content::RunAllPendingInMessageLoop();
98 } 99 }
99 100
100 void SetDefaultNetworkStateHelperExpectations() { 101 void SetDefaultNetworkStateHelperExpectations() {
101 EXPECT_CALL(*mock_network_state_helper_, GetCurrentNetworkName()) 102 EXPECT_CALL(*mock_network_state_helper_, GetCurrentNetworkName())
102 .Times(AnyNumber()) 103 .Times(AnyNumber())
103 .WillRepeatedly((Return(base::string16()))); 104 .WillRepeatedly((Return(base::string16())));
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 // Wait for the enrollment screen. 271 // Wait for the enrollment screen.
271 OobeScreenWaiter(OobeScreen::SCREEN_OOBE_ENROLLMENT) 272 OobeScreenWaiter(OobeScreen::SCREEN_OOBE_ENROLLMENT)
272 .WaitNoAssertCurrentScreen(); 273 .WaitNoAssertCurrentScreen();
273 274
274 // Reset the enrollment helper so there is no side effect with other tests. 275 // Reset the enrollment helper so there is no side effect with other tests.
275 static_cast<EnrollmentScreen*>(wizard_controller->current_screen()) 276 static_cast<EnrollmentScreen*>(wizard_controller->current_screen())
276 ->enrollment_helper_.reset(); 277 ->enrollment_helper_.reset();
277 } 278 }
278 279
279 } // namespace chromeos 280 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/screens/network_screen.cc ('k') | chrome/browser/chromeos/login/screens/reset_screen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698