Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(359)

Side by Side Diff: chrome/browser/chromeos/login/login_ui_browsertest.cc

Issue 83293004: kiosk: Show enrollment screen first if needed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, fix LOG(INFO) Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/login_display_host_impl.cc ('k') | chrome/browser/chromeos/login/wizard_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698