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 12 matching lines...) Expand all Loading... |
23 #include "base/sys_info.h" | 23 #include "base/sys_info.h" |
24 #include "base/test/scoped_path_override.h" | 24 #include "base/test/scoped_path_override.h" |
25 #include "base/threading/sequenced_worker_pool.h" | 25 #include "base/threading/sequenced_worker_pool.h" |
26 #include "chrome/browser/chromeos/app_mode/kiosk_app_data.h" | 26 #include "chrome/browser/chromeos/app_mode/kiosk_app_data.h" |
27 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" | 27 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" |
28 #include "chrome/browser/chromeos/login/users/mock_user_manager.h" | 28 #include "chrome/browser/chromeos/login/users/mock_user_manager.h" |
29 #include "chrome/browser/chromeos/login/users/scoped_user_manager_enabler.h" | 29 #include "chrome/browser/chromeos/login/users/scoped_user_manager_enabler.h" |
30 #include "chrome/browser/chromeos/ownership/fake_owner_settings_service.h" | 30 #include "chrome/browser/chromeos/ownership/fake_owner_settings_service.h" |
31 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 31 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
32 #include "chrome/browser/chromeos/policy/device_local_account.h" | 32 #include "chrome/browser/chromeos/policy/device_local_account.h" |
33 #include "chrome/browser/chromeos/policy/stub_enterprise_install_attributes.h" | |
34 #include "chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h" | 33 #include "chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h" |
| 34 #include "chrome/browser/chromeos/settings/stub_install_attributes.h" |
35 #include "chrome/common/chrome_paths.h" | 35 #include "chrome/common/chrome_paths.h" |
36 #include "chrome/common/pref_names.h" | 36 #include "chrome/common/pref_names.h" |
37 #include "chrome/test/base/testing_browser_process.h" | 37 #include "chrome/test/base/testing_browser_process.h" |
38 #include "chromeos/dbus/cros_disks_client.h" | 38 #include "chromeos/dbus/cros_disks_client.h" |
39 #include "chromeos/dbus/dbus_thread_manager.h" | 39 #include "chromeos/dbus/dbus_thread_manager.h" |
40 #include "chromeos/dbus/fake_update_engine_client.h" | 40 #include "chromeos/dbus/fake_update_engine_client.h" |
41 #include "chromeos/dbus/shill_device_client.h" | 41 #include "chromeos/dbus/shill_device_client.h" |
42 #include "chromeos/dbus/shill_ipconfig_client.h" | 42 #include "chromeos/dbus/shill_ipconfig_client.h" |
43 #include "chromeos/dbus/shill_service_client.h" | 43 #include "chromeos/dbus/shill_service_client.h" |
44 #include "chromeos/disks/disk_mount_manager.h" | 44 #include "chromeos/disks/disk_mount_manager.h" |
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 } | 405 } |
406 | 406 |
407 // Since this is a unit test running in browser_tests we must do additional | 407 // Since this is a unit test running in browser_tests we must do additional |
408 // unit test setup and make a TestingBrowserProcess. Must be first member. | 408 // unit test setup and make a TestingBrowserProcess. Must be first member. |
409 TestingBrowserProcessInitializer initializer_; | 409 TestingBrowserProcessInitializer initializer_; |
410 base::MessageLoopForUI message_loop_; | 410 base::MessageLoopForUI message_loop_; |
411 content::TestBrowserThread ui_thread_; | 411 content::TestBrowserThread ui_thread_; |
412 content::TestBrowserThread file_thread_; | 412 content::TestBrowserThread file_thread_; |
413 content::TestBrowserThread io_thread_; | 413 content::TestBrowserThread io_thread_; |
414 | 414 |
415 ScopedStubEnterpriseInstallAttributes install_attributes_; | 415 chromeos::ScopedStubInstallAttributes install_attributes_; |
416 TestingPrefServiceSimple prefs_; | 416 TestingPrefServiceSimple prefs_; |
417 chromeos::system::ScopedFakeStatisticsProvider fake_statistics_provider_; | 417 chromeos::system::ScopedFakeStatisticsProvider fake_statistics_provider_; |
418 DiskMountManager::MountPointMap mount_point_map_; | 418 DiskMountManager::MountPointMap mount_point_map_; |
419 chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; | 419 chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; |
420 chromeos::ScopedTestCrosSettings test_cros_settings_; | 420 chromeos::ScopedTestCrosSettings test_cros_settings_; |
421 chromeos::ScopedCrosSettingsTestHelper settings_helper_; | 421 chromeos::ScopedCrosSettingsTestHelper settings_helper_; |
422 std::unique_ptr<chromeos::FakeOwnerSettingsService> owner_settings_service_; | 422 std::unique_ptr<chromeos::FakeOwnerSettingsService> owner_settings_service_; |
423 chromeos::MockUserManager* const user_manager_; | 423 chromeos::MockUserManager* const user_manager_; |
424 chromeos::ScopedUserManagerEnabler user_manager_enabler_; | 424 chromeos::ScopedUserManagerEnabler user_manager_enabler_; |
425 em::DeviceStatusReportRequest device_status_; | 425 em::DeviceStatusReportRequest device_status_; |
(...skipping 981 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1407 AccountId::FromUserEmail(kPublicAccountId)); | 1407 AccountId::FromUserEmail(kPublicAccountId)); |
1408 EXPECT_CALL(*user_manager_, IsLoggedInAsPublicAccount()) | 1408 EXPECT_CALL(*user_manager_, IsLoggedInAsPublicAccount()) |
1409 .WillRepeatedly(Return(true)); | 1409 .WillRepeatedly(Return(true)); |
1410 | 1410 |
1411 settings_helper_.SetBoolean(chromeos::kReportDeviceNetworkInterfaces, true); | 1411 settings_helper_.SetBoolean(chromeos::kReportDeviceNetworkInterfaces, true); |
1412 GetStatus(); | 1412 GetStatus(); |
1413 VerifyNetworkReporting(); | 1413 VerifyNetworkReporting(); |
1414 } | 1414 } |
1415 | 1415 |
1416 } // namespace policy | 1416 } // namespace policy |
OLD | NEW |