| 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 29 matching lines...) Expand all Loading... |
| 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, | 48 void OnSetUserNamePassword(const std::string& username, |
| 49 const std::string& password) override; | 49 const std::string& password) override; |
| 50 void SetUsageStatisticsReporting(bool val) override; | |
| 51 bool GetUsageStatisticsReporting() const override; | |
| 52 void SetHostConfiguration() override; | 50 void SetHostConfiguration() override; |
| 53 void ConfigureHost(bool accepted_eula, | 51 void ConfigureHost(bool accepted_eula, |
| 54 const std::string& lang, | 52 const std::string& lang, |
| 55 const std::string& timezone, | 53 const std::string& timezone, |
| 56 bool send_reports, | 54 bool send_reports, |
| 57 const std::string& keyboard_layout) override; | 55 const std::string& keyboard_layout) override; |
| 58 ErrorScreen* GetErrorScreen() override; | 56 ErrorScreen* GetErrorScreen() override; |
| 59 void ShowErrorScreen() override; | 57 void ShowErrorScreen() override; |
| 60 void HideErrorScreen(BaseScreen* parent_screen) override; | 58 void HideErrorScreen(BaseScreen* parent_screen) override; |
| 61 | 59 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 } | 95 } |
| 98 | 96 |
| 99 void DeviceDisabledScreenTest::ShowCurrentScreen() { | 97 void DeviceDisabledScreenTest::ShowCurrentScreen() { |
| 100 } | 98 } |
| 101 | 99 |
| 102 void DeviceDisabledScreenTest::OnSetUserNamePassword( | 100 void DeviceDisabledScreenTest::OnSetUserNamePassword( |
| 103 const std::string& username, | 101 const std::string& username, |
| 104 const std::string& password) { | 102 const std::string& password) { |
| 105 } | 103 } |
| 106 | 104 |
| 107 void DeviceDisabledScreenTest::SetUsageStatisticsReporting(bool val) { | |
| 108 } | |
| 109 | |
| 110 bool DeviceDisabledScreenTest::GetUsageStatisticsReporting() const { | |
| 111 return false; | |
| 112 } | |
| 113 | |
| 114 void DeviceDisabledScreenTest::SetHostConfiguration() { | 105 void DeviceDisabledScreenTest::SetHostConfiguration() { |
| 115 } | 106 } |
| 116 | 107 |
| 117 void DeviceDisabledScreenTest::ConfigureHost( | 108 void DeviceDisabledScreenTest::ConfigureHost( |
| 118 bool accepted_eula, | 109 bool accepted_eula, |
| 119 const std::string& lang, | 110 const std::string& lang, |
| 120 const std::string& timezone, | 111 const std::string& timezone, |
| 121 bool send_reports, | 112 bool send_reports, |
| 122 const std::string& keyboard_layout) { | 113 const std::string& keyboard_layout) { |
| 123 } | 114 } |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 // Verifies that the device disabled screen is shown when the device is marked | 196 // Verifies that the device disabled screen is shown when the device is marked |
| 206 // as disabled, device disabling is not turned off by flag and the device is not | 197 // as disabled, device disabling is not turned off by flag and the device is not |
| 207 // owned yet. | 198 // owned yet. |
| 208 TEST_F(DeviceDisabledScreenTest, ShowWhenDisabledAndNotOwned) { | 199 TEST_F(DeviceDisabledScreenTest, ShowWhenDisabledAndNotOwned) { |
| 209 SetDeviceDisabled(true); | 200 SetDeviceDisabled(true); |
| 210 ExpectScreenToShow(); | 201 ExpectScreenToShow(); |
| 211 TryToShowScreen(); | 202 TryToShowScreen(); |
| 212 } | 203 } |
| 213 | 204 |
| 214 } // namespace chromeos | 205 } // namespace chromeos |
| OLD | NEW |