OLD | NEW |
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 Loading... |
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 OnSetUserNamePassword(const std::string& username, | |
49 const std::string& password) override; | |
50 void SetHostConfiguration() override; | 48 void SetHostConfiguration() override; |
51 void ConfigureHost(bool accepted_eula, | 49 void ConfigureHost(bool accepted_eula, |
52 const std::string& lang, | 50 const std::string& lang, |
53 const std::string& timezone, | 51 const std::string& timezone, |
54 bool send_reports, | 52 bool send_reports, |
55 const std::string& keyboard_layout) override; | 53 const std::string& keyboard_layout) override; |
56 ErrorScreen* GetErrorScreen() override; | 54 ErrorScreen* GetErrorScreen() override; |
57 void ShowErrorScreen() override; | 55 void ShowErrorScreen() override; |
58 void HideErrorScreen(BaseScreen* parent_screen) override; | 56 void HideErrorScreen(BaseScreen* parent_screen) override; |
59 | 57 |
(...skipping 30 matching lines...) Expand all Loading... |
90 screen_.reset(new DeviceDisabledScreen(this, actor_.get())); | 88 screen_.reset(new DeviceDisabledScreen(this, actor_.get())); |
91 } | 89 } |
92 | 90 |
93 void DeviceDisabledScreenTest::TearDown() { | 91 void DeviceDisabledScreenTest::TearDown() { |
94 TestingBrowserProcess::GetGlobal()->SetLocalState(nullptr); | 92 TestingBrowserProcess::GetGlobal()->SetLocalState(nullptr); |
95 } | 93 } |
96 | 94 |
97 void DeviceDisabledScreenTest::ShowCurrentScreen() { | 95 void DeviceDisabledScreenTest::ShowCurrentScreen() { |
98 } | 96 } |
99 | 97 |
100 void DeviceDisabledScreenTest::OnSetUserNamePassword( | |
101 const std::string& username, | |
102 const std::string& password) { | |
103 } | |
104 | |
105 void DeviceDisabledScreenTest::SetHostConfiguration() { | 98 void DeviceDisabledScreenTest::SetHostConfiguration() { |
106 } | 99 } |
107 | 100 |
108 void DeviceDisabledScreenTest::ConfigureHost( | 101 void DeviceDisabledScreenTest::ConfigureHost( |
109 bool accepted_eula, | 102 bool accepted_eula, |
110 const std::string& lang, | 103 const std::string& lang, |
111 const std::string& timezone, | 104 const std::string& timezone, |
112 bool send_reports, | 105 bool send_reports, |
113 const std::string& keyboard_layout) { | 106 const std::string& keyboard_layout) { |
114 } | 107 } |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 // Verifies that the device disabled screen is shown when the device is marked | 189 // Verifies that the device disabled screen is shown when the device is marked |
197 // as disabled, device disabling is not turned off by flag and the device is not | 190 // as disabled, device disabling is not turned off by flag and the device is not |
198 // owned yet. | 191 // owned yet. |
199 TEST_F(DeviceDisabledScreenTest, ShowWhenDisabledAndNotOwned) { | 192 TEST_F(DeviceDisabledScreenTest, ShowWhenDisabledAndNotOwned) { |
200 SetDeviceDisabled(true); | 193 SetDeviceDisabled(true); |
201 ExpectScreenToShow(); | 194 ExpectScreenToShow(); |
202 TryToShowScreen(); | 195 TryToShowScreen(); |
203 } | 196 } |
204 | 197 |
205 } // namespace chromeos | 198 } // namespace chromeos |
OLD | NEW |