Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Side by Side Diff: chrome/browser/chromeos/policy/device_status_collector_browsertest.cc

Issue 2132663002: kiosk: Add status report for os update and running app (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update doc for running_kiosk_app Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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>
11 #include <string> 11 #include <string>
12 #include <utility> 12 #include <utility>
13 #include <vector> 13 #include <vector>
14 14
15 #include "base/bind.h" 15 #include "base/bind.h"
16 #include "base/environment.h" 16 #include "base/environment.h"
17 #include "base/logging.h" 17 #include "base/logging.h"
18 #include "base/macros.h" 18 #include "base/macros.h"
19 #include "base/memory/ptr_util.h" 19 #include "base/memory/ptr_util.h"
20 #include "base/message_loop/message_loop.h" 20 #include "base/message_loop/message_loop.h"
21 #include "base/run_loop.h" 21 #include "base/run_loop.h"
22 #include "base/strings/stringprintf.h" 22 #include "base/strings/stringprintf.h"
23 #include "base/sys_info.h"
24 #include "base/test/scoped_path_override.h"
23 #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"
27 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h"
24 #include "chrome/browser/chromeos/login/users/mock_user_manager.h" 28 #include "chrome/browser/chromeos/login/users/mock_user_manager.h"
25 #include "chrome/browser/chromeos/login/users/scoped_user_manager_enabler.h" 29 #include "chrome/browser/chromeos/login/users/scoped_user_manager_enabler.h"
26 #include "chrome/browser/chromeos/ownership/fake_owner_settings_service.h" 30 #include "chrome/browser/chromeos/ownership/fake_owner_settings_service.h"
27 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" 31 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
28 #include "chrome/browser/chromeos/policy/device_local_account.h" 32 #include "chrome/browser/chromeos/policy/device_local_account.h"
29 #include "chrome/browser/chromeos/policy/stub_enterprise_install_attributes.h" 33 #include "chrome/browser/chromeos/policy/stub_enterprise_install_attributes.h"
30 #include "chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h" 34 #include "chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h"
35 #include "chrome/common/chrome_paths.h"
31 #include "chrome/common/pref_names.h" 36 #include "chrome/common/pref_names.h"
32 #include "chrome/test/base/testing_browser_process.h" 37 #include "chrome/test/base/testing_browser_process.h"
33 #include "chromeos/dbus/cros_disks_client.h" 38 #include "chromeos/dbus/cros_disks_client.h"
34 #include "chromeos/dbus/dbus_thread_manager.h" 39 #include "chromeos/dbus/dbus_thread_manager.h"
40 #include "chromeos/dbus/fake_update_engine_client.h"
35 #include "chromeos/dbus/shill_device_client.h" 41 #include "chromeos/dbus/shill_device_client.h"
36 #include "chromeos/dbus/shill_ipconfig_client.h" 42 #include "chromeos/dbus/shill_ipconfig_client.h"
37 #include "chromeos/dbus/shill_service_client.h" 43 #include "chromeos/dbus/shill_service_client.h"
38 #include "chromeos/disks/disk_mount_manager.h" 44 #include "chromeos/disks/disk_mount_manager.h"
39 #include "chromeos/disks/mock_disk_mount_manager.h" 45 #include "chromeos/disks/mock_disk_mount_manager.h"
40 #include "chromeos/network/network_handler.h" 46 #include "chromeos/network/network_handler.h"
41 #include "chromeos/network/network_state.h" 47 #include "chromeos/network/network_state.h"
42 #include "chromeos/network/network_state_handler.h" 48 #include "chromeos/network/network_state_handler.h"
43 #include "chromeos/settings/cros_settings_names.h" 49 #include "chromeos/settings/cros_settings_names.h"
44 #include "chromeos/system/fake_statistics_provider.h" 50 #include "chromeos/system/fake_statistics_provider.h"
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 install_attributes_("managed.com", 259 install_attributes_("managed.com",
254 "user@managed.com", 260 "user@managed.com",
255 "device_id", 261 "device_id",
256 DEVICE_MODE_ENTERPRISE), 262 DEVICE_MODE_ENTERPRISE),
257 settings_helper_(false), 263 settings_helper_(false),
258 user_manager_(new chromeos::MockUserManager()), 264 user_manager_(new chromeos::MockUserManager()),
259 user_manager_enabler_(user_manager_), 265 user_manager_enabler_(user_manager_),
260 fake_device_local_account_(policy::DeviceLocalAccount::TYPE_KIOSK_APP, 266 fake_device_local_account_(policy::DeviceLocalAccount::TYPE_KIOSK_APP,
261 kKioskAccountId, 267 kKioskAccountId,
262 kKioskAppId, 268 kKioskAppId,
263 std::string() /* kiosk_app_update_url */) { 269 std::string() /* kiosk_app_update_url */),
270 user_data_dir_override_(chrome::DIR_USER_DATA),
271 update_engine_client_(new chromeos::FakeUpdateEngineClient) {
264 // Run this test with a well-known timezone so that Time::LocalMidnight() 272 // Run this test with a well-known timezone so that Time::LocalMidnight()
265 // returns the same values on all machines. 273 // returns the same values on all machines.
266 std::unique_ptr<base::Environment> env(base::Environment::Create()); 274 std::unique_ptr<base::Environment> env(base::Environment::Create());
267 env->SetVar("TZ", "UTC"); 275 env->SetVar("TZ", "UTC");
268 276
269 // Initialize our mock mounted disk volumes. 277 // Initialize our mock mounted disk volumes.
270 std::unique_ptr<chromeos::disks::MockDiskMountManager> 278 std::unique_ptr<chromeos::disks::MockDiskMountManager>
271 mock_disk_mount_manager = 279 mock_disk_mount_manager =
272 base::WrapUnique(new chromeos::disks::MockDiskMountManager()); 280 base::WrapUnique(new chromeos::disks::MockDiskMountManager());
273 AddMountPoint("/mount/volume1"); 281 AddMountPoint("/mount/volume1");
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 content::BrowserThread::GetBlockingPool()->FlushForTesting(); 322 content::BrowserThread::GetBlockingPool()->FlushForTesting();
315 message_loop_.RunUntilIdle(); 323 message_loop_.RunUntilIdle();
316 storage::ExternalMountPoints::GetSystemInstance()->RevokeAllFileSystems(); 324 storage::ExternalMountPoints::GetSystemInstance()->RevokeAllFileSystems();
317 DiskMountManager::Shutdown(); 325 DiskMountManager::Shutdown();
318 } 326 }
319 327
320 void SetUp() override { 328 void SetUp() override {
321 // Disable network interface reporting since it requires additional setup. 329 // Disable network interface reporting since it requires additional setup.
322 settings_helper_.SetBoolean(chromeos::kReportDeviceNetworkInterfaces, 330 settings_helper_.SetBoolean(chromeos::kReportDeviceNetworkInterfaces,
323 false); 331 false);
332
333 TestingBrowserProcess::GetGlobal()->SetLocalState(&local_state_);
334 chromeos::KioskAppManager::RegisterPrefs(local_state_.registry());
335
336 std::unique_ptr<chromeos::DBusThreadManagerSetter> dbus_setter =
337 chromeos::DBusThreadManager::GetSetterForTesting();
338 dbus_setter->SetUpdateEngineClient(
Thiemo Nagel 2016/07/10 08:47:47 Would it be sufficient to set the update engine cl
xiyuan 2016/07/11 16:29:17 Moved this and fake local state setup above to cto
339 base::WrapUnique<chromeos::UpdateEngineClient>(update_engine_client_));
324 } 340 }
325 341
326 void TearDown() override { settings_helper_.RestoreProvider(); } 342 void TearDown() override {
343 chromeos::KioskAppManager::Shutdown();
344 TestingBrowserProcess::GetGlobal()->SetLocalState(nullptr);
345 settings_helper_.RestoreProvider();
346 }
327 347
328 void RestartStatusCollector( 348 void RestartStatusCollector(
329 const policy::DeviceStatusCollector::VolumeInfoFetcher& volume_info, 349 const policy::DeviceStatusCollector::VolumeInfoFetcher& volume_info,
330 const policy::DeviceStatusCollector::CPUStatisticsFetcher& cpu_stats, 350 const policy::DeviceStatusCollector::CPUStatisticsFetcher& cpu_stats,
331 const policy::DeviceStatusCollector::CPUTempFetcher& cpu_temp_fetcher) { 351 const policy::DeviceStatusCollector::CPUTempFetcher& cpu_temp_fetcher) {
332 policy::DeviceStatusCollector::LocationUpdateRequester callback = 352 policy::DeviceStatusCollector::LocationUpdateRequester callback =
333 base::Bind(&MockPositionUpdateRequester); 353 base::Bind(&MockPositionUpdateRequester);
334 std::vector<em::VolumeInfo> expected_volume_info; 354 std::vector<em::VolumeInfo> expected_volume_info;
335 status_collector_.reset(new TestingDeviceStatusCollector( 355 status_collector_.reset(new TestingDeviceStatusCollector(
336 &prefs_, &fake_statistics_provider_, callback, volume_info, cpu_stats, 356 &prefs_, &fake_statistics_provider_, callback, volume_info, cpu_stats,
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 void MockRunningKioskApp(const DeviceLocalAccount& account) { 404 void MockRunningKioskApp(const DeviceLocalAccount& account) {
385 std::vector<DeviceLocalAccount> accounts; 405 std::vector<DeviceLocalAccount> accounts;
386 accounts.push_back(account); 406 accounts.push_back(account);
387 SetDeviceLocalAccounts(owner_settings_service_.get(), accounts); 407 SetDeviceLocalAccounts(owner_settings_service_.get(), accounts);
388 user_manager_->CreateKioskAppUser( 408 user_manager_->CreateKioskAppUser(
389 AccountId::FromUserEmail(account.user_id)); 409 AccountId::FromUserEmail(account.user_id));
390 EXPECT_CALL(*user_manager_, IsLoggedInAsKioskApp()).WillRepeatedly( 410 EXPECT_CALL(*user_manager_, IsLoggedInAsKioskApp()).WillRepeatedly(
391 Return(true)); 411 Return(true));
392 } 412 }
393 413
414 void MockPlatformVersion(const std::string& platform_version) {
415 const std::string lsb_release = base::StringPrintf(
416 "CHROMEOS_RELEASE_VERSION=%s", platform_version.c_str());
417 base::SysInfo::SetChromeOSVersionInfoForTest(lsb_release,
418 base::Time::Now());
419 }
420
421 void MockAutoLaunchKioskAppWithRequiredPlatformVersion(
422 const DeviceLocalAccount& auto_launch_app_account,
423 const std::string& required_platform_version) {
424 chromeos::KioskAppManager* manager = chromeos::KioskAppManager::Get();
425 manager->AddAppForTest(
426 auto_launch_app_account.kiosk_app_id,
427 AccountId::FromUserEmail(auto_launch_app_account.user_id),
428 GURL("http://cws/"), // Dummy URL to avoid setup ExtensionsClient.
429 required_platform_version);
430 manager->SetEnableAutoLaunch(true);
431
432 std::vector<DeviceLocalAccount> accounts;
433 accounts.push_back(auto_launch_app_account);
434 SetDeviceLocalAccounts(owner_settings_service_.get(), accounts);
435
436 owner_settings_service_->SetString(
437 chromeos::kAccountsPrefDeviceLocalAccountAutoLoginId,
438 auto_launch_app_account.account_id);
439
440 message_loop_.RunUntilIdle();
441
442 ASSERT_EQ(required_platform_version,
443 manager->GetAutoLaunchAppRequiredPlatformVersion());
444 }
445
394 protected: 446 protected:
395 // Convenience method. 447 // Convenience method.
396 int64_t ActivePeriodMilliseconds() { 448 int64_t ActivePeriodMilliseconds() {
397 return policy::DeviceStatusCollector::kIdlePollIntervalSeconds * 1000; 449 return policy::DeviceStatusCollector::kIdlePollIntervalSeconds * 1000;
398 } 450 }
399 451
400 // Since this is a unit test running in browser_tests we must do additional 452 // Since this is a unit test running in browser_tests we must do additional
401 // unit test setup and make a TestingBrowserProcess. Must be first member. 453 // unit test setup and make a TestingBrowserProcess. Must be first member.
402 TestingBrowserProcessInitializer initializer_; 454 TestingBrowserProcessInitializer initializer_;
403 base::MessageLoopForUI message_loop_; 455 base::MessageLoopForUI message_loop_;
404 content::TestBrowserThread ui_thread_; 456 content::TestBrowserThread ui_thread_;
405 content::TestBrowserThread file_thread_; 457 content::TestBrowserThread file_thread_;
406 content::TestBrowserThread io_thread_; 458 content::TestBrowserThread io_thread_;
407 459
408 ScopedStubEnterpriseInstallAttributes install_attributes_; 460 ScopedStubEnterpriseInstallAttributes install_attributes_;
409 TestingPrefServiceSimple prefs_; 461 TestingPrefServiceSimple prefs_;
410 chromeos::system::ScopedFakeStatisticsProvider fake_statistics_provider_; 462 chromeos::system::ScopedFakeStatisticsProvider fake_statistics_provider_;
411 DiskMountManager::MountPointMap mount_point_map_; 463 DiskMountManager::MountPointMap mount_point_map_;
412 chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; 464 chromeos::ScopedTestDeviceSettingsService test_device_settings_service_;
413 chromeos::ScopedTestCrosSettings test_cros_settings_; 465 chromeos::ScopedTestCrosSettings test_cros_settings_;
414 chromeos::ScopedCrosSettingsTestHelper settings_helper_; 466 chromeos::ScopedCrosSettingsTestHelper settings_helper_;
415 std::unique_ptr<chromeos::FakeOwnerSettingsService> owner_settings_service_; 467 std::unique_ptr<chromeos::FakeOwnerSettingsService> owner_settings_service_;
416 chromeos::MockUserManager* user_manager_; 468 chromeos::MockUserManager* const user_manager_;
417 chromeos::ScopedUserManagerEnabler user_manager_enabler_; 469 chromeos::ScopedUserManagerEnabler user_manager_enabler_;
418 em::DeviceStatusReportRequest status_; 470 em::DeviceStatusReportRequest status_;
419 std::unique_ptr<TestingDeviceStatusCollector> status_collector_; 471 std::unique_ptr<TestingDeviceStatusCollector> status_collector_;
420 const policy::DeviceLocalAccount fake_device_local_account_; 472 const policy::DeviceLocalAccount fake_device_local_account_;
473 base::ScopedPathOverride user_data_dir_override_;
474 TestingPrefServiceSimple local_state_;
475 chromeos::FakeUpdateEngineClient* const update_engine_client_;
421 }; 476 };
422 477
423 TEST_F(DeviceStatusCollectorTest, AllIdle) { 478 TEST_F(DeviceStatusCollectorTest, AllIdle) {
424 ui::IdleState test_states[] = { 479 ui::IdleState test_states[] = {
425 ui::IDLE_STATE_IDLE, 480 ui::IDLE_STATE_IDLE,
426 ui::IDLE_STATE_IDLE, 481 ui::IDLE_STATE_IDLE,
427 ui::IDLE_STATE_IDLE 482 ui::IDLE_STATE_IDLE
428 }; 483 };
429 settings_helper_.SetBoolean(chromeos::kReportDeviceActivityTimes, true); 484 settings_helper_.SetBoolean(chromeos::kReportDeviceActivityTimes, true);
430 485
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
1011 ASSERT_EQ(1, session_status.installed_apps_size()); 1066 ASSERT_EQ(1, session_status.installed_apps_size());
1012 EXPECT_EQ(kKioskAccountId, session_status.device_local_account_id()); 1067 EXPECT_EQ(kKioskAccountId, session_status.device_local_account_id());
1013 const em::AppStatus app = session_status.installed_apps(0); 1068 const em::AppStatus app = session_status.installed_apps(0);
1014 EXPECT_EQ(kKioskAppId, app.app_id()); 1069 EXPECT_EQ(kKioskAppId, app.app_id());
1015 // Test code just sets the version to the app ID. 1070 // Test code just sets the version to the app ID.
1016 EXPECT_EQ(kKioskAppId, app.extension_version()); 1071 EXPECT_EQ(kKioskAppId, app.extension_version());
1017 EXPECT_FALSE(app.has_status()); 1072 EXPECT_FALSE(app.has_status());
1018 EXPECT_FALSE(app.has_error()); 1073 EXPECT_FALSE(app.has_error());
1019 } 1074 }
1020 1075
1076 TEST_F(DeviceStatusCollectorTest, NoOsUpdateStatusByDefault) {
1077 MockPlatformVersion("1234.0.0");
1078 MockAutoLaunchKioskAppWithRequiredPlatformVersion(fake_device_local_account_,
1079 "1234.0.0");
1080
1081 GetStatus();
1082 EXPECT_FALSE(status_.has_os_update_status());
1083 }
1084
1085 TEST_F(DeviceStatusCollectorTest, ReportOsUpdateStatusUpToDate) {
1086 MockPlatformVersion("1234.0.0");
1087 settings_helper_.SetBoolean(chromeos::kReportOsUpdateStatus, true);
1088
1089 const char* kRequiredPlatformVersions[] = {"1234", "1234.0", "1234.0.0"};
1090
1091 for (size_t i = 0; i < arraysize(kRequiredPlatformVersions); ++i) {
1092 MockAutoLaunchKioskAppWithRequiredPlatformVersion(
1093 fake_device_local_account_, kRequiredPlatformVersions[i]);
1094
1095 GetStatus();
1096 ASSERT_TRUE(status_.has_os_update_status()) << "Required platform version="
1097 << kRequiredPlatformVersions[i];
1098 EXPECT_EQ(em::OsUpdateStatus::OS_UP_TO_DATE,
1099 status_.os_update_status().update_status())
1100 << "Required platform version=" << kRequiredPlatformVersions[i];
1101 EXPECT_EQ(kRequiredPlatformVersions[i],
1102 status_.os_update_status().new_required_platform_version())
1103 << "Required platform version=" << kRequiredPlatformVersions[i];
1104 }
1105 }
1106
1107 TEST_F(DeviceStatusCollectorTest, ReportOsUpdateStatus) {
1108 MockPlatformVersion("1234.0.0");
1109 settings_helper_.SetBoolean(chromeos::kReportOsUpdateStatus, true);
1110 MockAutoLaunchKioskAppWithRequiredPlatformVersion(fake_device_local_account_,
1111 "1235");
1112
1113 chromeos::UpdateEngineClient::Status update_status;
1114 update_status.status = chromeos::UpdateEngineClient::UPDATE_STATUS_IDLE;
1115
1116 GetStatus();
1117 ASSERT_TRUE(status_.has_os_update_status());
1118 EXPECT_EQ(em::OsUpdateStatus::OS_IMAGE_DOWNLOAD_NOT_STARTED,
1119 status_.os_update_status().update_status());
1120
1121 const chromeos::UpdateEngineClient::UpdateStatusOperation kUpdateEngineOps[] =
1122 {
1123 chromeos::UpdateEngineClient::UPDATE_STATUS_DOWNLOADING,
1124 chromeos::UpdateEngineClient::UPDATE_STATUS_VERIFYING,
1125 chromeos::UpdateEngineClient::UPDATE_STATUS_FINALIZING,
1126 };
1127
1128 for (size_t i = 0; i < arraysize(kUpdateEngineOps); ++i) {
1129 update_status.status = kUpdateEngineOps[i];
1130 update_status.new_version = "1235.1.2";
1131 update_engine_client_->PushLastStatus(update_status);
1132
1133 GetStatus();
1134 ASSERT_TRUE(status_.has_os_update_status());
1135 EXPECT_EQ(em::OsUpdateStatus::OS_IMAGE_DOWNLOAD_IN_PROGRESS,
1136 status_.os_update_status().update_status());
1137 EXPECT_EQ("1235.1.2", status_.os_update_status().new_platform_version());
1138 EXPECT_EQ("1235",
1139 status_.os_update_status().new_required_platform_version());
1140 }
1141
1142 update_status.status =
1143 chromeos::UpdateEngineClient::UPDATE_STATUS_UPDATED_NEED_REBOOT;
1144 update_engine_client_->PushLastStatus(update_status);
1145 GetStatus();
1146 ASSERT_TRUE(status_.has_os_update_status());
1147 EXPECT_EQ(em::OsUpdateStatus::OS_UPDATE_NEED_REBOOT,
1148 status_.os_update_status().update_status());
1149 }
1150
1151 TEST_F(DeviceStatusCollectorTest, NoRunningKioskAppByDefault) {
1152 MockPlatformVersion("1234.0.0");
1153 MockAutoLaunchKioskAppWithRequiredPlatformVersion(fake_device_local_account_,
1154 "1234.0.0");
1155 status_collector_->set_kiosk_account(base::WrapUnique(
1156 new policy::DeviceLocalAccount(fake_device_local_account_)));
1157 MockRunningKioskApp(fake_device_local_account_);
1158
1159 GetStatus();
1160 EXPECT_FALSE(status_.has_running_kiosk_app());
1161 }
1162
1163 TEST_F(DeviceStatusCollectorTest, NoRunningKioskAppWhenNotInKioskSession) {
1164 settings_helper_.SetBoolean(chromeos::kReportRunningKioskApp, true);
1165 MockPlatformVersion("1234.0.0");
1166 MockAutoLaunchKioskAppWithRequiredPlatformVersion(fake_device_local_account_,
1167 "1234.0.0");
1168
1169 GetStatus();
1170 EXPECT_FALSE(status_.has_running_kiosk_app());
1171 }
1172
1173 TEST_F(DeviceStatusCollectorTest, ReportRunningKioskApp) {
1174 settings_helper_.SetBoolean(chromeos::kReportRunningKioskApp, true);
1175 MockPlatformVersion("1234.0.0");
1176 MockAutoLaunchKioskAppWithRequiredPlatformVersion(fake_device_local_account_,
1177 "1235");
1178 MockRunningKioskApp(fake_device_local_account_);
1179 status_collector_->set_kiosk_account(base::WrapUnique(
1180 new policy::DeviceLocalAccount(fake_device_local_account_)));
1181
1182 GetStatus();
1183 ASSERT_TRUE(status_.has_running_kiosk_app());
1184 const em::AppStatus app = status_.running_kiosk_app();
1185 EXPECT_EQ(kKioskAppId, app.app_id());
1186 EXPECT_EQ("1235", app.required_platform_version());
1187 EXPECT_FALSE(app.has_status());
1188 EXPECT_FALSE(app.has_error());
1189 }
1190
1021 // Fake device state. 1191 // Fake device state.
1022 struct FakeDeviceData { 1192 struct FakeDeviceData {
1023 const char* device_path; 1193 const char* device_path;
1024 const char* type; 1194 const char* type;
1025 const char* object_path; 1195 const char* object_path;
1026 const char* mac_address; 1196 const char* mac_address;
1027 const char* meid; 1197 const char* meid;
1028 const char* imei; 1198 const char* imei;
1029 int expected_type; // proto enum type value, -1 for not present. 1199 int expected_type; // proto enum type value, -1 for not present.
1030 }; 1200 };
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
1314 AccountId::FromUserEmail(kPublicAccountId)); 1484 AccountId::FromUserEmail(kPublicAccountId));
1315 EXPECT_CALL(*user_manager_, IsLoggedInAsPublicAccount()) 1485 EXPECT_CALL(*user_manager_, IsLoggedInAsPublicAccount())
1316 .WillRepeatedly(Return(true)); 1486 .WillRepeatedly(Return(true));
1317 1487
1318 settings_helper_.SetBoolean(chromeos::kReportDeviceNetworkInterfaces, true); 1488 settings_helper_.SetBoolean(chromeos::kReportDeviceNetworkInterfaces, true);
1319 GetStatus(); 1489 GetStatus();
1320 VerifyNetworkReporting(); 1490 VerifyNetworkReporting();
1321 } 1491 }
1322 1492
1323 } // namespace policy 1493 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698