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" |
| 6 #include "chrome/browser/browser_process.h" |
5 #include "chrome/browser/chromeos/login/login_manager_test.h" | 7 #include "chrome/browser/chromeos/login/login_manager_test.h" |
6 #include "chrome/browser/chromeos/login/startup_utils.h" | 8 #include "chrome/browser/chromeos/login/startup_utils.h" |
7 #include "testing/gmock/include/gmock/gmock.h" | 9 #include "chrome/browser/chromeos/login/test/oobe_screen_waiter.h" |
8 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "chrome/common/pref_names.h" |
9 | |
10 using ::testing::_; | |
11 using ::testing::AnyNumber; | |
12 using ::testing::Return; | |
13 | 11 |
14 namespace chromeos { | 12 namespace chromeos { |
15 | 13 |
16 namespace { | 14 namespace { |
17 | 15 |
18 const char kTestUser1[] = "test-user1@gmail.com"; | 16 const char kTestUser1[] = "test-user1@gmail.com"; |
19 const char kTestUser2[] = "test-user2@gmail.com"; | 17 const char kTestUser2[] = "test-user2@gmail.com"; |
20 | 18 |
21 } // anonymous namespace | 19 } // anonymous namespace |
22 | 20 |
(...skipping 15 matching lines...) Expand all Loading... |
38 JSExpect("!!document.querySelector('#pod-row')"); | 36 JSExpect("!!document.querySelector('#pod-row')"); |
39 JSExpect( | 37 JSExpect( |
40 "document.querySelectorAll('.pod:not(#user-pod-template)').length == 2"); | 38 "document.querySelectorAll('.pod:not(#user-pod-template)').length == 2"); |
41 | 39 |
42 JSExpect("document.querySelectorAll('.pod:not(#user-pod-template)')[0]" | 40 JSExpect("document.querySelectorAll('.pod:not(#user-pod-template)')[0]" |
43 ".user.emailAddress == '" + std::string(kTestUser1) + "'"); | 41 ".user.emailAddress == '" + std::string(kTestUser1) + "'"); |
44 JSExpect("document.querySelectorAll('.pod:not(#user-pod-template)')[1]" | 42 JSExpect("document.querySelectorAll('.pod:not(#user-pod-template)')[1]" |
45 ".user.emailAddress == '" + std::string(kTestUser2) + "'"); | 43 ".user.emailAddress == '" + std::string(kTestUser2) + "'"); |
46 } | 44 } |
47 | 45 |
| 46 IN_PROC_BROWSER_TEST_F(LoginUITest, PRE_ShowEnrollmentFirst) { |
| 47 StartupUtils::MarkOobeCompleted(); |
| 48 |
| 49 PrefService* prefs = g_browser_process->local_state(); |
| 50 prefs->SetBoolean(prefs::kDeviceEnrollmentAutoStart, true); |
| 51 } |
| 52 |
| 53 // Tests that the default first screen is the enrollment screen after OOBE |
| 54 // when auto enrollment is enabled and device is not yet enrolled. |
| 55 IN_PROC_BROWSER_TEST_F(LoginUITest, ShowEnrollmentFirst) { |
| 56 OobeScreenWaiter(OobeDisplay::SCREEN_OOBE_ENROLLMENT).Wait(); |
| 57 } |
| 58 |
48 } // namespace chromeos | 59 } // namespace chromeos |
OLD | NEW |