OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/kiosk_mode/kiosk_mode_settings.h" | 5 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 } | 66 } |
67 | 67 |
68 void DisableKioskModeSettings() { | 68 void DisableKioskModeSettings() { |
69 KioskModeSettings::Get()->set_initialized(false); | 69 KioskModeSettings::Get()->set_initialized(false); |
70 } | 70 } |
71 | 71 |
72 MessageLoop message_loop_; | 72 MessageLoop message_loop_; |
73 content::TestBrowserThread ui_thread_; | 73 content::TestBrowserThread ui_thread_; |
74 content::TestBrowserThread file_thread_; | 74 content::TestBrowserThread file_thread_; |
75 | 75 |
| 76 ScopedTestCrosSettings test_cros_settings_; |
| 77 |
76 CrosSettingsProvider* device_settings_provider_; | 78 CrosSettingsProvider* device_settings_provider_; |
77 StubCrosSettingsProvider stub_settings_provider_; | 79 StubCrosSettingsProvider stub_settings_provider_; |
78 }; | 80 }; |
79 | 81 |
80 TEST_F(KioskModeSettingsTest, DisabledByDefault) { | 82 TEST_F(KioskModeSettingsTest, DisabledByDefault) { |
81 EXPECT_FALSE(KioskModeSettings::Get()->IsKioskModeEnabled()); | 83 EXPECT_FALSE(KioskModeSettings::Get()->IsKioskModeEnabled()); |
82 } | 84 } |
83 | 85 |
84 TEST_F(KioskModeSettingsTest, InstanceAvailable) { | 86 TEST_F(KioskModeSettingsTest, InstanceAvailable) { |
85 EXPECT_TRUE(KioskModeSettings::Get() != NULL); | 87 EXPECT_TRUE(KioskModeSettings::Get() != NULL); |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 // Time delta initializes to '0' microseconds. | 156 // Time delta initializes to '0' microseconds. |
155 EXPECT_LT(KioskModeSettings::Get()->GetScreensaverTimeout(), | 157 EXPECT_LT(KioskModeSettings::Get()->GetScreensaverTimeout(), |
156 base::TimeDelta()); | 158 base::TimeDelta()); |
157 EXPECT_LT(KioskModeSettings::Get()->GetIdleLogoutTimeout(), | 159 EXPECT_LT(KioskModeSettings::Get()->GetIdleLogoutTimeout(), |
158 base::TimeDelta()); | 160 base::TimeDelta()); |
159 EXPECT_LT(KioskModeSettings::Get()->GetIdleLogoutWarningDuration(), | 161 EXPECT_LT(KioskModeSettings::Get()->GetIdleLogoutWarningDuration(), |
160 base::TimeDelta()); | 162 base::TimeDelta()); |
161 } | 163 } |
162 | 164 |
163 } // namespace chromeos | 165 } // namespace chromeos |
OLD | NEW |