OLD | NEW |
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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 private: | 173 private: |
174 // Overridden from InProcessBrowserTest: | 174 // Overridden from InProcessBrowserTest: |
175 void SetUpCommandLine(base::CommandLine* command_line) override { | 175 void SetUpCommandLine(base::CommandLine* command_line) override { |
176 command_line->AppendSwitchASCII( | 176 command_line->AppendSwitchASCII( |
177 switches::kEnterpriseEnableZeroTouchEnrollment, "hands-off"); | 177 switches::kEnterpriseEnableZeroTouchEnrollment, "hands-off"); |
178 } | 178 } |
179 | 179 |
180 DISALLOW_COPY_AND_ASSIGN(HandsOffNetworkScreenTest); | 180 DISALLOW_COPY_AND_ASSIGN(HandsOffNetworkScreenTest); |
181 }; | 181 }; |
182 | 182 |
183 IN_PROC_BROWSER_TEST_F(HandsOffNetworkScreenTest, RequiresNoInput) { | 183 #if defined(OS_CHROMEOS) |
| 184 // Flaky on ChromeOS. See https://crbug.com/674782. |
| 185 #define MAYBE_RequiresNoInput DISABLED_RequiresNoInput |
| 186 #else |
| 187 #define MAYBE_RequiresNoInput RequiresNoInput |
| 188 #endif |
| 189 IN_PROC_BROWSER_TEST_F(HandsOffNetworkScreenTest, MAYBE_RequiresNoInput) { |
184 WizardController* wizard_controller = WizardController::default_controller(); | 190 WizardController* wizard_controller = WizardController::default_controller(); |
185 | 191 |
186 // Allow the WizardController to advance throught the enrollment flow. | 192 // Allow the WizardController to advance throught the enrollment flow. |
187 network_screen_->base_screen_delegate_ = wizard_controller; | 193 network_screen_->base_screen_delegate_ = wizard_controller; |
188 | 194 |
189 // Simulate a network connection. | 195 // Simulate a network connection. |
190 EXPECT_CALL(*mock_network_state_helper_, IsConnected()) | 196 EXPECT_CALL(*mock_network_state_helper_, IsConnected()) |
191 .Times(AnyNumber()) | 197 .Times(AnyNumber()) |
192 .WillRepeatedly((Return(true))); | 198 .WillRepeatedly((Return(true))); |
193 network_screen_->UpdateStatus(); | 199 network_screen_->UpdateStatus(); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 "}" | 231 "}" |
226 "SendReplyIfEnrollmentDone();", | 232 "SendReplyIfEnrollmentDone();", |
227 &done)); | 233 &done)); |
228 | 234 |
229 // Reset the enrollment helper so there is no side effect with other tests. | 235 // Reset the enrollment helper so there is no side effect with other tests. |
230 static_cast<EnrollmentScreen*>(wizard_controller->current_screen()) | 236 static_cast<EnrollmentScreen*>(wizard_controller->current_screen()) |
231 ->enrollment_helper_.reset(); | 237 ->enrollment_helper_.reset(); |
232 } | 238 } |
233 | 239 |
234 } // namespace chromeos | 240 } // namespace chromeos |
OLD | NEW |