| 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/settings/device_settings_provider.h" | 5 #include "chrome/browser/chromeos/settings/device_settings_provider.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 // kReportDeviceLocation, | 152 // kReportDeviceLocation, |
| 153 kReportDeviceNetworkInterfaces, | 153 kReportDeviceNetworkInterfaces, |
| 154 kReportDeviceUsers, | 154 kReportDeviceUsers, |
| 155 kReportDeviceHardwareStatus, | 155 kReportDeviceHardwareStatus, |
| 156 kReportDeviceSessionStatus, | 156 kReportDeviceSessionStatus, |
| 157 kReportOsUpdateStatus, | 157 kReportOsUpdateStatus, |
| 158 kReportRunningKioskApp | 158 kReportRunningKioskApp |
| 159 }; | 159 }; |
| 160 | 160 |
| 161 const base::FundamentalValue expected_enable_value(expected_enable_state); | 161 const base::FundamentalValue expected_enable_value(expected_enable_state); |
| 162 for (const auto& setting : reporting_settings) { | 162 for (auto* setting : reporting_settings) { |
| 163 EXPECT_TRUE(base::Value::Equals(provider_->Get(setting), | 163 EXPECT_TRUE(base::Value::Equals(provider_->Get(setting), |
| 164 &expected_enable_value)) | 164 &expected_enable_value)) |
| 165 << "Value for " << setting << " does not match expected"; | 165 << "Value for " << setting << " does not match expected"; |
| 166 } | 166 } |
| 167 const base::FundamentalValue expected_frequency_value(expected_frequency); | 167 const base::FundamentalValue expected_frequency_value(expected_frequency); |
| 168 EXPECT_TRUE(base::Value::Equals(provider_->Get(kReportUploadFrequency), | 168 EXPECT_TRUE(base::Value::Equals(provider_->Get(kReportUploadFrequency), |
| 169 &expected_frequency_value)); | 169 &expected_frequency_value)); |
| 170 } | 170 } |
| 171 | 171 |
| 172 // Helper routine to ensure log upload policy has been correctly | 172 // Helper routine to ensure log upload policy has been correctly |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 502 } | 502 } |
| 503 | 503 |
| 504 TEST_F(DeviceSettingsProviderTest, DecodeLogUploadSettings) { | 504 TEST_F(DeviceSettingsProviderTest, DecodeLogUploadSettings) { |
| 505 SetLogUploadSettings(true); | 505 SetLogUploadSettings(true); |
| 506 VerifyLogUploadSettings(true); | 506 VerifyLogUploadSettings(true); |
| 507 | 507 |
| 508 SetLogUploadSettings(false); | 508 SetLogUploadSettings(false); |
| 509 VerifyLogUploadSettings(false); | 509 VerifyLogUploadSettings(false); |
| 510 } | 510 } |
| 511 } // namespace chromeos | 511 } // namespace chromeos |
| OLD | NEW |