| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "base/prefs/pref_service.h" | 5 #include "base/prefs/pref_service.h" |
| 6 #include "chrome/browser/browser_process.h" | 6 #include "chrome/browser/browser_process.h" |
| 7 #include "chrome/browser/chromeos/login/login_manager_test.h" | 7 #include "chrome/browser/chromeos/login/login_manager_test.h" |
| 8 #include "chrome/browser/chromeos/login/startup_utils.h" | 8 #include "chrome/browser/chromeos/login/startup_utils.h" |
| 9 #include "chrome/browser/chromeos/login/test/oobe_screen_waiter.h" | 9 #include "chrome/browser/chromeos/login/test/oobe_screen_waiter.h" |
| 10 #include "chrome/common/pref_names.h" | 10 #include "chrome/common/pref_names.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 JSExpect("!!document.querySelector('#pod-row')"); | 36 JSExpect("!!document.querySelector('#pod-row')"); |
| 37 JSExpect( | 37 JSExpect( |
| 38 "document.querySelectorAll('.pod:not(#user-pod-template)').length == 2"); | 38 "document.querySelectorAll('.pod:not(#user-pod-template)').length == 2"); |
| 39 | 39 |
| 40 JSExpect("document.querySelectorAll('.pod:not(#user-pod-template)')[0]" | 40 JSExpect("document.querySelectorAll('.pod:not(#user-pod-template)')[0]" |
| 41 ".user.emailAddress == '" + std::string(kTestUser1) + "'"); | 41 ".user.emailAddress == '" + std::string(kTestUser1) + "'"); |
| 42 JSExpect("document.querySelectorAll('.pod:not(#user-pod-template)')[1]" | 42 JSExpect("document.querySelectorAll('.pod:not(#user-pod-template)')[1]" |
| 43 ".user.emailAddress == '" + std::string(kTestUser2) + "'"); | 43 ".user.emailAddress == '" + std::string(kTestUser2) + "'"); |
| 44 } | 44 } |
| 45 | 45 |
| 46 IN_PROC_BROWSER_TEST_F(LoginUITest, PRE_ShowEnrollmentFirst) { | 46 IN_PROC_BROWSER_TEST_F(LoginUITest, PRE_InterruptedAutoStartEnrollment) { |
| 47 StartupUtils::MarkOobeCompleted(); | 47 StartupUtils::MarkOobeCompleted(); |
| 48 | 48 |
| 49 PrefService* prefs = g_browser_process->local_state(); | 49 PrefService* prefs = g_browser_process->local_state(); |
| 50 prefs->SetBoolean(prefs::kDeviceEnrollmentAutoStart, true); | 50 prefs->SetBoolean(prefs::kDeviceEnrollmentAutoStart, true); |
| 51 } | 51 } |
| 52 | 52 |
| 53 // Tests that the default first screen is the enrollment screen after OOBE | 53 // Tests that the default first screen is the network screen after OOBE |
| 54 // when auto enrollment is enabled and device is not yet enrolled. | 54 // when auto enrollment is enabled and device is not yet enrolled. |
| 55 IN_PROC_BROWSER_TEST_F(LoginUITest, ShowEnrollmentFirst) { | 55 IN_PROC_BROWSER_TEST_F(LoginUITest, InterruptedAutoStartEnrollment) { |
| 56 OobeScreenWaiter(OobeDisplay::SCREEN_OOBE_ENROLLMENT).Wait(); | 56 OobeScreenWaiter(OobeDisplay::SCREEN_OOBE_NETWORK).Wait(); |
| 57 } | 57 } |
| 58 | 58 |
| 59 } // namespace chromeos | 59 } // namespace chromeos |
| OLD | NEW |