Cast: Stop logging kVideoFrameSentToEncoder and rename a couple events.
[chromium-blink-merge.git] / chrome / browser / chromeos / login / login_ui_browsertest.cc
blob4f545ed00681ad34b67e7ec3bb894d7bf469e614
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
3 // found in the LICENSE file.
5 #include "base/prefs/pref_service.h"
6 #include "chrome/browser/browser_process.h"
7 #include "chrome/browser/chromeos/login/login_manager_test.h"
8 #include "chrome/browser/chromeos/login/startup_utils.h"
9 #include "chrome/browser/chromeos/login/test/oobe_screen_waiter.h"
10 #include "chrome/common/pref_names.h"
12 namespace chromeos {
14 namespace {
16 const char kTestUser1[] = "test-user1@gmail.com";
17 const char kTestUser2[] = "test-user2@gmail.com";
19 } // anonymous namespace
21 class LoginUITest : public chromeos::LoginManagerTest {
22 public:
23 LoginUITest() : LoginManagerTest(false) {}
24 virtual ~LoginUITest() {}
27 IN_PROC_BROWSER_TEST_F(LoginUITest, PRE_LoginUIVisible) {
28 RegisterUser(kTestUser1);
29 RegisterUser(kTestUser2);
30 StartupUtils::MarkOobeCompleted();
33 // Verifies basic login UI properties.
34 IN_PROC_BROWSER_TEST_F(LoginUITest, LoginUIVisible) {
35 JSExpect("!!document.querySelector('#account-picker')");
36 JSExpect("!!document.querySelector('#pod-row')");
37 JSExpect(
38 "document.querySelectorAll('.pod:not(#user-pod-template)').length == 2");
40 JSExpect("document.querySelectorAll('.pod:not(#user-pod-template)')[0]"
41 ".user.emailAddress == '" + std::string(kTestUser1) + "'");
42 JSExpect("document.querySelectorAll('.pod:not(#user-pod-template)')[1]"
43 ".user.emailAddress == '" + std::string(kTestUser2) + "'");
46 IN_PROC_BROWSER_TEST_F(LoginUITest, PRE_InterruptedAutoStartEnrollment) {
47 StartupUtils::MarkOobeCompleted();
49 PrefService* prefs = g_browser_process->local_state();
50 prefs->SetBoolean(prefs::kDeviceEnrollmentAutoStart, true);
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.
55 IN_PROC_BROWSER_TEST_F(LoginUITest, InterruptedAutoStartEnrollment) {
56 OobeScreenWaiter(OobeDisplay::SCREEN_OOBE_NETWORK).Wait();
59 } // namespace chromeos