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

Side by Side Diff: chrome/browser/chromeos/login/screens/device_disabled_screen_unittest.cc

Issue 673813003: SetHostConfiguration() and ConfigureHost() are moved from ScreenObserver. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git cl format Created 6 years, 1 month 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/device_disabled_screen.h" 5 #include "chrome/browser/chromeos/login/screens/device_disabled_screen.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/prefs/scoped_user_pref_update.h" 10 #include "base/prefs/scoped_user_pref_update.h"
(...skipping 27 matching lines...) Expand all
38 DeviceDisabledScreenTest(); 38 DeviceDisabledScreenTest();
39 ~DeviceDisabledScreenTest() override; 39 ~DeviceDisabledScreenTest() override;
40 40
41 // testing::Test: 41 // testing::Test:
42 void SetUp() override; 42 void SetUp() override;
43 void TearDown() override; 43 void TearDown() override;
44 44
45 // ScreenObserver: 45 // ScreenObserver:
46 MOCK_METHOD1(OnExit, void(ExitCodes)); 46 MOCK_METHOD1(OnExit, void(ExitCodes));
47 void ShowCurrentScreen() override; 47 void ShowCurrentScreen() override;
48 void SetHostConfiguration() override;
49 void ConfigureHost(bool accepted_eula,
50 const std::string& lang,
51 const std::string& timezone,
52 bool send_reports,
53 const std::string& keyboard_layout) override;
54 ErrorScreen* GetErrorScreen() override; 48 ErrorScreen* GetErrorScreen() override;
55 void ShowErrorScreen() override; 49 void ShowErrorScreen() override;
56 void HideErrorScreen(BaseScreen* parent_screen) override; 50 void HideErrorScreen(BaseScreen* parent_screen) override;
57 51
58 void SetDeviceDisabled(bool disabled); 52 void SetDeviceDisabled(bool disabled);
59 void SetDeviceMode(policy::DeviceMode device_mode); 53 void SetDeviceMode(policy::DeviceMode device_mode);
60 54
61 void ExpectScreenToNotShow(); 55 void ExpectScreenToNotShow();
62 void ExpectScreenToShow(); 56 void ExpectScreenToShow();
63 57
(...skipping 24 matching lines...) Expand all
88 screen_.reset(new DeviceDisabledScreen(this, actor_.get())); 82 screen_.reset(new DeviceDisabledScreen(this, actor_.get()));
89 } 83 }
90 84
91 void DeviceDisabledScreenTest::TearDown() { 85 void DeviceDisabledScreenTest::TearDown() {
92 TestingBrowserProcess::GetGlobal()->SetLocalState(nullptr); 86 TestingBrowserProcess::GetGlobal()->SetLocalState(nullptr);
93 } 87 }
94 88
95 void DeviceDisabledScreenTest::ShowCurrentScreen() { 89 void DeviceDisabledScreenTest::ShowCurrentScreen() {
96 } 90 }
97 91
98 void DeviceDisabledScreenTest::SetHostConfiguration() {
99 }
100
101 void DeviceDisabledScreenTest::ConfigureHost(
102 bool accepted_eula,
103 const std::string& lang,
104 const std::string& timezone,
105 bool send_reports,
106 const std::string& keyboard_layout) {
107 }
108
109 ErrorScreen* DeviceDisabledScreenTest::GetErrorScreen() { 92 ErrorScreen* DeviceDisabledScreenTest::GetErrorScreen() {
110 return nullptr; 93 return nullptr;
111 } 94 }
112 95
113 void DeviceDisabledScreenTest::ShowErrorScreen() { 96 void DeviceDisabledScreenTest::ShowErrorScreen() {
114 } 97 }
115 98
116 void DeviceDisabledScreenTest::HideErrorScreen(BaseScreen* parent_screen) { 99 void DeviceDisabledScreenTest::HideErrorScreen(BaseScreen* parent_screen) {
117 } 100 }
118 101
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 // Verifies that the device disabled screen is shown when the device is marked 172 // Verifies that the device disabled screen is shown when the device is marked
190 // as disabled, device disabling is not turned off by flag and the device is not 173 // as disabled, device disabling is not turned off by flag and the device is not
191 // owned yet. 174 // owned yet.
192 TEST_F(DeviceDisabledScreenTest, ShowWhenDisabledAndNotOwned) { 175 TEST_F(DeviceDisabledScreenTest, ShowWhenDisabledAndNotOwned) {
193 SetDeviceDisabled(true); 176 SetDeviceDisabled(true);
194 ExpectScreenToShow(); 177 ExpectScreenToShow();
195 TryToShowScreen(); 178 TryToShowScreen();
196 } 179 }
197 180
198 } // namespace chromeos 181 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698