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

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

Issue 2700303002: cros: Unify oobe View/Actor naming to just View. (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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 NetworkScreen* network_screen_; 114 NetworkScreen* network_screen_;
115 FakeSessionManagerClient* fake_session_manager_client_; 115 FakeSessionManagerClient* fake_session_manager_client_;
116 116
117 private: 117 private:
118 DISALLOW_COPY_AND_ASSIGN(NetworkScreenTest); 118 DISALLOW_COPY_AND_ASSIGN(NetworkScreenTest);
119 }; 119 };
120 120
121 IN_PROC_BROWSER_TEST_F(NetworkScreenTest, CanConnect) { 121 IN_PROC_BROWSER_TEST_F(NetworkScreenTest, CanConnect) {
122 EXPECT_CALL(*mock_network_state_helper_, IsConnecting()) 122 EXPECT_CALL(*mock_network_state_helper_, IsConnecting())
123 .WillOnce((Return(true))); 123 .WillOnce((Return(true)));
124 // EXPECT_FALSE(actor_->IsContinueEnabled()); 124 // EXPECT_FALSE(view_->IsContinueEnabled());
125 network_screen_->UpdateStatus(); 125 network_screen_->UpdateStatus();
126 126
127 EXPECT_CALL(*mock_network_state_helper_, IsConnected()) 127 EXPECT_CALL(*mock_network_state_helper_, IsConnected())
128 .Times(2) 128 .Times(2)
129 .WillRepeatedly(Return(true)); 129 .WillRepeatedly(Return(true));
130 // TODO(nkostylev): Add integration with WebUI actor http://crosbug.com/22570 130 // TODO(nkostylev): Add integration with WebUI view http://crosbug.com/22570
131 // EXPECT_FALSE(actor_->IsContinueEnabled()); 131 // EXPECT_FALSE(view_->IsContinueEnabled());
132 // EXPECT_FALSE(actor_->IsConnecting()); 132 // EXPECT_FALSE(view_->IsConnecting());
133 network_screen_->UpdateStatus(); 133 network_screen_->UpdateStatus();
134 134
135 // EXPECT_TRUE(actor_->IsContinueEnabled()); 135 // EXPECT_TRUE(view_->IsContinueEnabled());
136 EmulateContinueButtonExit(network_screen_); 136 EmulateContinueButtonExit(network_screen_);
137 } 137 }
138 138
139 IN_PROC_BROWSER_TEST_F(NetworkScreenTest, Timeout) { 139 IN_PROC_BROWSER_TEST_F(NetworkScreenTest, Timeout) {
140 EXPECT_CALL(*mock_network_state_helper_, IsConnecting()) 140 EXPECT_CALL(*mock_network_state_helper_, IsConnecting())
141 .WillOnce((Return(true))); 141 .WillOnce((Return(true)));
142 // EXPECT_FALSE(actor_->IsContinueEnabled()); 142 // EXPECT_FALSE(view_->IsContinueEnabled());
143 network_screen_->UpdateStatus(); 143 network_screen_->UpdateStatus();
144 144
145 EXPECT_CALL(*mock_network_state_helper_, IsConnected()) 145 EXPECT_CALL(*mock_network_state_helper_, IsConnected())
146 .Times(2) 146 .Times(2)
147 .WillRepeatedly(Return(false)); 147 .WillRepeatedly(Return(false));
148 // TODO(nkostylev): Add integration with WebUI actor http://crosbug.com/22570 148 // TODO(nkostylev): Add integration with WebUI view http://crosbug.com/22570
149 // EXPECT_FALSE(actor_->IsContinueEnabled()); 149 // EXPECT_FALSE(view_->IsContinueEnabled());
150 // EXPECT_FALSE(actor_->IsConnecting()); 150 // EXPECT_FALSE(view_->IsConnecting());
151 network_screen_->OnConnectionTimeout(); 151 network_screen_->OnConnectionTimeout();
152 152
153 // Close infobubble with error message - it makes the test stable. 153 // Close infobubble with error message - it makes the test stable.
154 // EXPECT_FALSE(actor_->IsContinueEnabled()); 154 // EXPECT_FALSE(view_->IsContinueEnabled());
155 // EXPECT_FALSE(actor_->IsConnecting()); 155 // EXPECT_FALSE(view_->IsConnecting());
156 // actor_->ClearErrors(); 156 // view_->ClearErrors();
157 } 157 }
158 158
159 class HandsOffNetworkScreenTest : public NetworkScreenTest { 159 class HandsOffNetworkScreenTest : public NetworkScreenTest {
160 public: 160 public:
161 HandsOffNetworkScreenTest() {} 161 HandsOffNetworkScreenTest() {}
162 162
163 protected: 163 protected:
164 void SetUpOnMainThread() override { 164 void SetUpOnMainThread() override {
165 NetworkScreenTest::SetUpOnMainThread(); 165 NetworkScreenTest::SetUpOnMainThread();
166 166
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 // Wait for the enrollment screen. 270 // Wait for the enrollment screen.
271 OobeScreenWaiter(OobeScreen::SCREEN_OOBE_ENROLLMENT) 271 OobeScreenWaiter(OobeScreen::SCREEN_OOBE_ENROLLMENT)
272 .WaitNoAssertCurrentScreen(); 272 .WaitNoAssertCurrentScreen();
273 273
274 // Reset the enrollment helper so there is no side effect with other tests. 274 // Reset the enrollment helper so there is no side effect with other tests.
275 static_cast<EnrollmentScreen*>(wizard_controller->current_screen()) 275 static_cast<EnrollmentScreen*>(wizard_controller->current_screen())
276 ->enrollment_helper_.reset(); 276 ->enrollment_helper_.reset();
277 } 277 }
278 278
279 } // namespace chromeos 279 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/screens/mock_wrong_hwid_screen.cc ('k') | chrome/browser/chromeos/login/screens/reset_screen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698