| 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/policy/device_status_collector.h" | 5 #include "chrome/browser/chromeos/policy/device_status_collector.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 | 266 |
| 267 namespace policy { | 267 namespace policy { |
| 268 | 268 |
| 269 // Though it is a unit test, this test is linked with browser_tests so that it | 269 // Though it is a unit test, this test is linked with browser_tests so that it |
| 270 // runs in a separate process. The intention is to avoid overriding the timezone | 270 // runs in a separate process. The intention is to avoid overriding the timezone |
| 271 // environment variable for other tests. | 271 // environment variable for other tests. |
| 272 class DeviceStatusCollectorTest : public testing::Test { | 272 class DeviceStatusCollectorTest : public testing::Test { |
| 273 public: | 273 public: |
| 274 DeviceStatusCollectorTest() | 274 DeviceStatusCollectorTest() |
| 275 : install_attributes_( | 275 : install_attributes_( |
| 276 chromeos::ScopedStubInstallAttributes::CreateEnterprise( | 276 chromeos::ScopedStubInstallAttributes::CreateCloudManaged( |
| 277 "managed.com", | 277 "managed.com", |
| 278 "device_id")), | 278 "device_id")), |
| 279 settings_helper_(false), | 279 settings_helper_(false), |
| 280 user_manager_(new chromeos::MockUserManager()), | 280 user_manager_(new chromeos::MockUserManager()), |
| 281 user_manager_enabler_(user_manager_), | 281 user_manager_enabler_(user_manager_), |
| 282 got_session_status_(false), | 282 got_session_status_(false), |
| 283 fake_device_local_account_(policy::DeviceLocalAccount::TYPE_KIOSK_APP, | 283 fake_device_local_account_(policy::DeviceLocalAccount::TYPE_KIOSK_APP, |
| 284 kKioskAccountId, | 284 kKioskAccountId, |
| 285 kKioskAppId, | 285 kKioskAppId, |
| 286 std::string() /* kiosk_app_update_url */), | 286 std::string() /* kiosk_app_update_url */), |
| (...skipping 1320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1607 AccountId::FromUserEmail(kPublicAccountId)); | 1607 AccountId::FromUserEmail(kPublicAccountId)); |
| 1608 EXPECT_CALL(*user_manager_, IsLoggedInAsPublicAccount()) | 1608 EXPECT_CALL(*user_manager_, IsLoggedInAsPublicAccount()) |
| 1609 .WillRepeatedly(Return(true)); | 1609 .WillRepeatedly(Return(true)); |
| 1610 | 1610 |
| 1611 settings_helper_.SetBoolean(chromeos::kReportDeviceNetworkInterfaces, true); | 1611 settings_helper_.SetBoolean(chromeos::kReportDeviceNetworkInterfaces, true); |
| 1612 GetStatus(); | 1612 GetStatus(); |
| 1613 VerifyNetworkReporting(); | 1613 VerifyNetworkReporting(); |
| 1614 } | 1614 } |
| 1615 | 1615 |
| 1616 } // namespace policy | 1616 } // namespace policy |
| OLD | NEW |