| 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 private: | 161 private: |
| 162 // Overridden from InProcessBrowserTest: | 162 // Overridden from InProcessBrowserTest: |
| 163 void SetUpCommandLine(base::CommandLine* command_line) override { | 163 void SetUpCommandLine(base::CommandLine* command_line) override { |
| 164 command_line->AppendSwitchASCII( | 164 command_line->AppendSwitchASCII( |
| 165 switches::kEnterpriseEnableZeroTouchEnrollment, "hands-off"); | 165 switches::kEnterpriseEnableZeroTouchEnrollment, "hands-off"); |
| 166 } | 166 } |
| 167 | 167 |
| 168 DISALLOW_COPY_AND_ASSIGN(HandsOffNetworkScreenTest); | 168 DISALLOW_COPY_AND_ASSIGN(HandsOffNetworkScreenTest); |
| 169 }; | 169 }; |
| 170 | 170 |
| 171 IN_PROC_BROWSER_TEST_F(HandsOffNetworkScreenTest, RequiresNoInput) { | 171 #if defined(OS_CHROMEOS) |
| 172 #define MAYBE_RequiresNoInput DISABLED_RequiresNoInput |
| 173 #else |
| 174 #define MAYBE_RequiresNoInput RequiresNoInput |
| 175 #endif |
| 176 |
| 177 IN_PROC_BROWSER_TEST_F(HandsOffNetworkScreenTest, MAYBE_RequiresNoInput) { |
| 172 WizardController* wizard_controller = WizardController::default_controller(); | 178 WizardController* wizard_controller = WizardController::default_controller(); |
| 173 | 179 |
| 174 // Allow the WizardController to advance throught the enrollment flow. | 180 // Allow the WizardController to advance throught the enrollment flow. |
| 175 network_screen_->base_screen_delegate_ = wizard_controller; | 181 network_screen_->base_screen_delegate_ = wizard_controller; |
| 176 | 182 |
| 177 // Simulate a network connection. | 183 // Simulate a network connection. |
| 178 EXPECT_CALL(*mock_network_state_helper_, IsConnected()) | 184 EXPECT_CALL(*mock_network_state_helper_, IsConnected()) |
| 179 .WillRepeatedly((Return(true))); | 185 .WillRepeatedly((Return(true))); |
| 180 network_screen_->UpdateStatus(); | 186 network_screen_->UpdateStatus(); |
| 181 | 187 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 212 "}" | 218 "}" |
| 213 "SendReplyIfEnrollmentDone();", | 219 "SendReplyIfEnrollmentDone();", |
| 214 &done)); | 220 &done)); |
| 215 | 221 |
| 216 // Reset the enrollment helper so there is no side effect with other tests. | 222 // Reset the enrollment helper so there is no side effect with other tests. |
| 217 static_cast<EnrollmentScreen*>(wizard_controller->current_screen()) | 223 static_cast<EnrollmentScreen*>(wizard_controller->current_screen()) |
| 218 ->enrollment_helper_.reset(); | 224 ->enrollment_helper_.reset(); |
| 219 } | 225 } |
| 220 | 226 |
| 221 } // namespace chromeos | 227 } // namespace chromeos |
| OLD | NEW |