Lines Matching refs:attempter_
246 fake_system_state_.set_update_attempter(&attempter_); in UpdateAttempterTest()
253 attempter_.set_forced_update_pending_callback( in UpdateAttempterTest()
256 attempter_.Init(); in UpdateAttempterTest()
260 EXPECT_NE(nullptr, attempter_.system_state_); in SetUp()
261 EXPECT_NE(nullptr, attempter_.system_state_->update_manager()); in SetUp()
262 EXPECT_EQ(0, attempter_.http_response_code_); in SetUp()
263 EXPECT_EQ(UpdateStatus::IDLE, attempter_.status_); in SetUp()
264 EXPECT_EQ(0.0, attempter_.download_progress_); in SetUp()
265 EXPECT_EQ(0, attempter_.last_checked_time_); in SetUp()
266 EXPECT_EQ("0.0.0.0", attempter_.new_version_); in SetUp()
267 EXPECT_EQ(0ULL, attempter_.new_payload_size_); in SetUp()
269 attempter_.processor_.reset(processor_); // Transfers ownership. in SetUp()
339 UpdateAttempterUnderTest attempter_{&fake_system_state_}; member in chromeos_update_engine::UpdateAttempterTest
365 attempter_.status_ = cfu_params_.status; in TestCheckForUpdate()
374 attempter_.CheckForUpdate( in TestCheckForUpdate()
379 attempter_.forced_app_version()); in TestCheckForUpdate()
381 attempter_.forced_omaha_url()); in TestCheckForUpdate()
383 attempter_.WasScheduleUpdatesCalled()); in TestCheckForUpdate()
388 attempter_.DisableScheduleUpdates(); in TestProcessingDone()
389 attempter_.is_install_ = pd_params_.is_install; in TestProcessingDone()
390 attempter_.status_ = pd_params_.status; in TestProcessingDone()
391 attempter_.omaha_request_params_->set_dlc_apps_params( in TestProcessingDone()
409 attempter_.ProcessingDone(pd_params_.processor, pd_params_.code); in TestProcessingDone()
412 EXPECT_EQ(pd_params_.kExpectedIsInstall, attempter_.is_install_); in TestProcessingDone()
414 attempter_.WasScheduleUpdatesCalled()); in TestProcessingDone()
415 EXPECT_EQ(pd_params_.expected_exit_status, attempter_.status_); in TestProcessingDone()
426 EXPECT_NE(UpdateStatus::UPDATED_NEED_REBOOT, attempter_.status()); in SessionIdTestChange()
427 const auto old_session_id = attempter_.session_id_; in SessionIdTestChange()
428 attempter_.Update("", "", "", "", false, false, 0, false, false); in SessionIdTestChange()
429 EXPECT_NE(old_session_id, attempter_.session_id_); in SessionIdTestChange()
444 attempter_.DisableScheduleUpdates(); in SessionIdTestEnforceEmptyStrPingOmaha()
445 attempter_.status_ = UpdateStatus::UPDATED_NEED_REBOOT; in SessionIdTestEnforceEmptyStrPingOmaha()
446 const auto old_session_id = attempter_.session_id_; in SessionIdTestEnforceEmptyStrPingOmaha()
455 attempter_.PingOmaha(); in SessionIdTestEnforceEmptyStrPingOmaha()
456 EXPECT_EQ(old_session_id, attempter_.session_id_); in SessionIdTestEnforceEmptyStrPingOmaha()
457 EXPECT_EQ(UpdateStatus::UPDATED_NEED_REBOOT, attempter_.status_); in SessionIdTestEnforceEmptyStrPingOmaha()
480 attempter_.BuildUpdateActions(false); in SessionIdTestConsistencyInUpdateFlow()
507 attempter_.BuildUpdateActions(false); in SessionIdTestInDownloadAction()
509 EXPECT_EQ(attempter_.session_id_, header_value); in SessionIdTestInDownloadAction()
530 attempter_.ActionCompleted(nullptr, &action, ErrorCode::kSuccess); in TEST_F()
531 EXPECT_EQ(UpdateStatus::FINALIZING, attempter_.status()); in TEST_F()
532 EXPECT_EQ(0.0, attempter_.download_progress_); in TEST_F()
533 ASSERT_EQ(nullptr, attempter_.error_event_.get()); in TEST_F()
539 attempter_.status_ = UpdateStatus::DOWNLOADING; in TEST_F()
542 attempter_.ActionCompleted(nullptr, &action, ErrorCode::kError); in TEST_F()
543 ASSERT_NE(nullptr, attempter_.error_event_.get()); in TEST_F()
559 EXPECT_EQ(0.0, attempter_.download_progress_); in TEST_F()
562 attempter_.new_payload_size_ = bytes_total; in TEST_F()
574 attempter_.AddObserver(&observer); in TEST_F()
575 attempter_.BytesReceived(bytes_progressed_1, bytes_received_1, bytes_total); in TEST_F()
576 EXPECT_EQ(progress_1, attempter_.download_progress_); in TEST_F()
580 attempter_.BytesReceived(bytes_progressed_2, bytes_received_2, bytes_total); in TEST_F()
581 EXPECT_EQ(progress_2, attempter_.download_progress_); in TEST_F()
590 attempter_.status_ = UpdateStatus::CHECKING_FOR_UPDATE; in TEST_F()
593 attempter_.new_payload_size_ = bytes_total; in TEST_F()
594 EXPECT_EQ(0.0, attempter_.download_progress_); in TEST_F()
600 attempter_.AddObserver(&observer); in TEST_F()
601 attempter_.BytesReceived(bytes_progressed, bytes_received, bytes_total); in TEST_F()
602 EXPECT_EQ(UpdateStatus::DOWNLOADING, attempter_.status_); in TEST_F()
611 attempter_.status_ = UpdateStatus::DOWNLOADING; in TEST_F()
612 attempter_.new_payload_size_ = bytes_total; in TEST_F()
613 EXPECT_EQ(0.0, attempter_.download_progress_); in TEST_F()
620 attempter_.AddObserver(&observer); in TEST_F()
621 attempter_.BytesReceived(bytes_progressed, bytes_received, bytes_total); in TEST_F()
622 EXPECT_EQ(1.0, attempter_.download_progress_); in TEST_F()
636 attempter_.ActionCompleted(nullptr, &action, ErrorCode::kSuccess); in TEST_F()
637 EXPECT_EQ(500, attempter_.http_response_code()); in TEST_F()
638 EXPECT_EQ(UpdateStatus::IDLE, attempter_.status()); in TEST_F()
639 EXPECT_EQ(234U, attempter_.server_dictated_poll_interval_); in TEST_F()
640 ASSERT_TRUE(attempter_.error_event_.get() == nullptr); in TEST_F()
649 attempter_.Init(); in TEST_F()
650 EXPECT_EQ(UpdateStatus::UPDATED_NEED_REBOOT, attempter_.status()); in TEST_F()
683 attempter_.omaha_request_params_->set_delta_okay(true); in TEST_F()
686 attempter_.DisableDeltaUpdateIfNeeded(); in TEST_F()
687 EXPECT_TRUE(attempter_.omaha_request_params_->delta_okay()); in TEST_F()
692 attempter_.DisableDeltaUpdateIfNeeded(); in TEST_F()
693 EXPECT_TRUE(attempter_.omaha_request_params_->delta_okay()); in TEST_F()
698 attempter_.DisableDeltaUpdateIfNeeded(); in TEST_F()
699 EXPECT_FALSE(attempter_.omaha_request_params_->delta_okay()); in TEST_F()
701 attempter_.DisableDeltaUpdateIfNeeded(); in TEST_F()
702 EXPECT_FALSE(attempter_.omaha_request_params_->delta_okay()); in TEST_F()
721 attempter_.MarkDeltaUpdateFailure(); in TEST_F()
735 attempter_.ScheduleErrorEventAction(); in TEST_F()
746 attempter_.error_event_.reset(new OmahaEvent( in TEST_F()
748 attempter_.ScheduleErrorEventAction(); in TEST_F()
749 EXPECT_EQ(UpdateStatus::REPORTING_ERROR_EVENT, attempter_.status()); in TEST_F()
778 attempter_.set_http_response_code(200); in UpdateTestStart()
786 attempter_.policy_provider_.reset( in UpdateTestStart()
799 attempter_.Update("", "", "", "", false, false, 0, false, false); in UpdateTestStart()
806 EXPECT_EQ(0, attempter_.http_response_code()); in UpdateTestVerify()
807 EXPECT_EQ(&attempter_, processor_->delegate()); in UpdateTestVerify()
808 EXPECT_EQ(UpdateStatus::CHECKING_FOR_UPDATE, attempter_.status()); in UpdateTestVerify()
829 attempter_.policy_provider_.reset( in RollbackTestStart()
857 EXPECT_TRUE(attempter_.Rollback(true)); in RollbackTestStart()
862 EXPECT_FALSE(attempter_.Rollback(true)); in RollbackTestStart()
869 EXPECT_EQ(&attempter_, processor_->delegate()); in RollbackTestVerify()
870 EXPECT_EQ(UpdateStatus::ATTEMPTING_ROLLBACK, attempter_.status()); in RollbackTestVerify()
871 EXPECT_EQ(0U, attempter_.install_plan_->partitions.size()); in RollbackTestVerify()
872 EXPECT_EQ(attempter_.install_plan_->powerwash_required, true); in RollbackTestVerify()
913 attempter_.PingOmaha(); in PingOmahaTestStart()
918 EXPECT_FALSE(attempter_.waiting_for_scheduled_check_); in TEST_F()
919 EXPECT_FALSE(attempter_.WasScheduleUpdatesCalled()); in TEST_F()
922 attempter_.DisableScheduleUpdates(); in TEST_F()
927 EXPECT_EQ(UpdateStatus::UPDATED_NEED_REBOOT, attempter_.status()); in TEST_F()
928 EXPECT_TRUE(attempter_.WasScheduleUpdatesCalled()); in TEST_F()
934 attempter_.CreatePendingErrorEvent(&action, kCode); in TEST_F()
935 ASSERT_NE(nullptr, attempter_.error_event_.get()); in TEST_F()
936 EXPECT_EQ(OmahaEvent::kTypeUpdateComplete, attempter_.error_event_->type); in TEST_F()
937 EXPECT_EQ(OmahaEvent::kResultError, attempter_.error_event_->result); in TEST_F()
941 attempter_.error_event_->error_code); in TEST_F()
945 attempter_.install_plan_.reset(new InstallPlan); in TEST_F()
946 attempter_.install_plan_->is_resume = true; in TEST_F()
949 attempter_.CreatePendingErrorEvent(&action, kCode); in TEST_F()
950 ASSERT_NE(nullptr, attempter_.error_event_.get()); in TEST_F()
951 EXPECT_EQ(OmahaEvent::kTypeUpdateComplete, attempter_.error_event_->type); in TEST_F()
952 EXPECT_EQ(OmahaEvent::kResultError, attempter_.error_event_->result); in TEST_F()
957 attempter_.error_event_->error_code); in TEST_F()
965 attempter_.UpdateEngineStarted(); in TEST_F()
973 attempter_.UpdateEngineStarted(); in TEST_F()
982 attempter_.UpdateEngineStarted(); in TEST_F()
999 attempter_.Update("", "", "", "", false, false, 0, false, false); in P2PNotEnabledStart()
1021 attempter_.Update("", "", "", "", false, false, 0, false, false); in P2PEnabledStartingFailsStart()
1044 attempter_.Update("", "", "", "", false, false, 0, false, false); in P2PEnabledHousekeepingFailsStart()
1066 attempter_.Update("", "", "", "", false, false, 0, false, false); in P2PEnabledStart()
1089 attempter_.Update("", in P2PEnabledInteractiveStart()
1124 attempter_.policy_provider_.reset( in ReadScatterFactorFromPolicyTestStart()
1127 attempter_.Update("", "", "", "", false, false, 0, false, false); in ReadScatterFactorFromPolicyTestStart()
1128 EXPECT_EQ(scatter_factor_in_seconds, attempter_.scatter_factor_.InSeconds()); in ReadScatterFactorFromPolicyTestStart()
1146 attempter_.prefs_ = &fake_prefs; in DecrementUpdateCheckCountTestStart()
1162 attempter_.policy_provider_.reset( in DecrementUpdateCheckCountTestStart()
1165 attempter_.Update("", "", "", "", false, false, 0, false, false); in DecrementUpdateCheckCountTestStart()
1166 EXPECT_EQ(scatter_factor_in_seconds, attempter_.scatter_factor_.InSeconds()); in DecrementUpdateCheckCountTestStart()
1176 attempter_.omaha_request_params_->update_check_count_wait_enabled()); in DecrementUpdateCheckCountTestStart()
1181 attempter_.Update("", "", "", "", false, false, 0, false, false); in DecrementUpdateCheckCountTestStart()
1203 attempter_.prefs_ = &fake_prefs; in NoScatteringDoneDuringManualUpdateTestStart()
1224 attempter_.policy_provider_.reset( in NoScatteringDoneDuringManualUpdateTestStart()
1228 attempter_.Update("", in NoScatteringDoneDuringManualUpdateTestStart()
1237 EXPECT_EQ(scatter_factor_in_seconds, attempter_.scatter_factor_.InSeconds()); in NoScatteringDoneDuringManualUpdateTestStart()
1242 attempter_.omaha_request_params_->wall_clock_based_wait_enabled()); in NoScatteringDoneDuringManualUpdateTestStart()
1244 EXPECT_EQ(0, attempter_.omaha_request_params_->waiting_period().InSeconds()); in NoScatteringDoneDuringManualUpdateTestStart()
1246 attempter_.omaha_request_params_->update_check_count_wait_enabled()); in NoScatteringDoneDuringManualUpdateTestStart()
1254 attempter_.prefs_ = prefs; in SetUpStagingTest()
1261 attempter_.scatter_factor_ = TimeDelta::FromSeconds(20); in SetUpStagingTest()
1269 attempter_.policy_provider_.reset( in SetUpStagingTest()
1288 attempter_.Update("", "", "", "", false, false, 0, false, false); in StagingSetsPrefsAndTurnsOffScatteringStart()
1300 attempter_.omaha_request_params_->update_check_count_wait_enabled()); in StagingSetsPrefsAndTurnsOffScatteringStart()
1302 attempter_.omaha_request_params_->wall_clock_based_wait_enabled()); in StagingSetsPrefsAndTurnsOffScatteringStart()
1304 attempter_.omaha_request_params_->waiting_period().InDays()); in StagingSetsPrefsAndTurnsOffScatteringStart()
1306 EXPECT_EQ(waiting_time_days, attempter_.staging_wait_time_.InDays()); in StagingSetsPrefsAndTurnsOffScatteringStart()
1307 EXPECT_EQ(kValidStagingSchedule, attempter_.staging_schedule_); in StagingSetsPrefsAndTurnsOffScatteringStart()
1309 EXPECT_EQ(0, attempter_.scatter_factor_.InSeconds()); in StagingSetsPrefsAndTurnsOffScatteringStart()
1317 EXPECT_FALSE(attempter_.prefs_->Exists(kPrefsUpdateCheckCount)); in CheckStagingOff()
1318 EXPECT_FALSE(attempter_.prefs_->Exists(kPrefsWallClockScatteringWaitPeriod)); in CheckStagingOff()
1319 EXPECT_FALSE(attempter_.prefs_->Exists(kPrefsWallClockStagingWaitPeriod)); in CheckStagingOff()
1321 EXPECT_EQ(0, attempter_.omaha_request_params_->waiting_period().InDays()); in CheckStagingOff()
1322 EXPECT_EQ(attempter_.omaha_request_params_->waiting_period(), in CheckStagingOff()
1323 attempter_.staging_wait_time_); in CheckStagingOff()
1325 attempter_.omaha_request_params_->update_check_count_wait_enabled()); in CheckStagingOff()
1327 attempter_.omaha_request_params_->wall_clock_based_wait_enabled()); in CheckStagingOff()
1329 EXPECT_EQ(0, attempter_.scatter_factor_.InSeconds()); in CheckStagingOff()
1345 attempter_.Update( in StagingOffIfInteractiveStart()
1366 attempter_.Update( in StagingOffIfOobeStart()
1386 EXPECT_TRUE(attempter_.CheckAndReportDailyMetrics()); in TEST_F()
1388 EXPECT_FALSE(attempter_.CheckAndReportDailyMetrics()); in TEST_F()
1392 EXPECT_FALSE(attempter_.CheckAndReportDailyMetrics()); in TEST_F()
1397 EXPECT_FALSE(attempter_.CheckAndReportDailyMetrics()); in TEST_F()
1401 EXPECT_TRUE(attempter_.CheckAndReportDailyMetrics()); in TEST_F()
1404 EXPECT_FALSE(attempter_.CheckAndReportDailyMetrics()); in TEST_F()
1408 EXPECT_FALSE(attempter_.CheckAndReportDailyMetrics()); in TEST_F()
1410 EXPECT_TRUE(attempter_.CheckAndReportDailyMetrics()); in TEST_F()
1411 EXPECT_FALSE(attempter_.CheckAndReportDailyMetrics()); in TEST_F()
1415 EXPECT_FALSE(attempter_.CheckAndReportDailyMetrics()); in TEST_F()
1417 EXPECT_TRUE(attempter_.CheckAndReportDailyMetrics()); in TEST_F()
1418 EXPECT_FALSE(attempter_.CheckAndReportDailyMetrics()); in TEST_F()
1425 EXPECT_TRUE(attempter_.CheckAndReportDailyMetrics()); in TEST_F()
1426 EXPECT_FALSE(attempter_.CheckAndReportDailyMetrics()); in TEST_F()
1431 EXPECT_FALSE(attempter_.CheckAndReportDailyMetrics()); in TEST_F()
1433 EXPECT_TRUE(attempter_.CheckAndReportDailyMetrics()); in TEST_F()
1434 EXPECT_FALSE(attempter_.CheckAndReportDailyMetrics()); in TEST_F()
1443 attempter_.Init(); in TEST_F()
1446 EXPECT_FALSE(attempter_.GetBootTimeAtUpdate(&boot_time)); in TEST_F()
1448 attempter_.WriteUpdateCompletedMarker(); in TEST_F()
1450 EXPECT_TRUE(attempter_.GetBootTimeAtUpdate(&boot_time)); in TEST_F()
1456 EXPECT_TRUE(attempter_.IsAnyUpdateSourceAllowed()); in TEST_F()
1462 EXPECT_TRUE(attempter_.IsAnyUpdateSourceAllowed()); in TEST_F()
1468 EXPECT_FALSE(attempter_.IsAnyUpdateSourceAllowed()); in TEST_F()
1476 attempter_.status_ = status; in TEST_F()
1478 EXPECT_FALSE(attempter_.CheckForInstall({}, "")); in TEST_F()
1633 attempter_.set_forced_update_pending_callback(nullptr); in TEST_F()
1647 attempter_.set_forced_update_pending_callback(nullptr); in TEST_F()
1661 attempter_.CheckForInstall({}, "autest"); in TEST_F()
1662 EXPECT_EQ(constants::kOmahaDefaultAUTestURL, attempter_.forced_omaha_url()); in TEST_F()
1664 attempter_.CheckForInstall({}, "autest-scheduled"); in TEST_F()
1665 EXPECT_EQ(constants::kOmahaDefaultAUTestURL, attempter_.forced_omaha_url()); in TEST_F()
1667 attempter_.CheckForInstall({}, "http://omaha.phishing"); in TEST_F()
1668 EXPECT_EQ("", attempter_.forced_omaha_url()); in TEST_F()
1672 attempter_.CheckForInstall({}, "http://foo.bar"); in TEST_F()
1673 attempter_.status_ = UpdateStatus::DOWNLOADING; in TEST_F()
1674 EXPECT_TRUE(attempter_.is_install_); in TEST_F()
1675 attempter_.ProcessingDone(nullptr, ErrorCode::kSuccess); in TEST_F()
1677 attempter_.GetStatus(&status); in TEST_F()
1683 attempter_.is_install_ = true; in TEST_F()
1684 attempter_.Rollback(false); in TEST_F()
1685 EXPECT_FALSE(attempter_.is_install_); in TEST_F()
1689 attempter_.is_install_ = true; in TEST_F()
1690 attempter_.CheckForUpdate("", "", UpdateAttemptFlags::kNone); in TEST_F()
1691 EXPECT_FALSE(attempter_.is_install_); in TEST_F()
1695 attempter_.CalculateUpdateParams( in TEST_F()
1700 attempter_.CalculateUpdateParams( in TEST_F()
1707 attempter_.CalculateUpdateParams("", in TEST_F()
1720 attempter_.CalculateUpdateParams("", in TEST_F()
1744 attempter_.ActionCompleted( in TEST_F()
1748 attempter_.GetStatus(&status); in TEST_F()
1750 EXPECT_TRUE(attempter_.install_plan_); in TEST_F()
1751 EXPECT_EQ(attempter_.install_plan_->version, status.new_version); in TEST_F()
1752 EXPECT_EQ(attempter_.install_plan_->payloads[0].size, in TEST_F()
1757 EXPECT_TRUE(nullptr != attempter_.error_event_); in TEST_F()
1758 EXPECT_EQ(OmahaEvent::kTypeUpdateComplete, attempter_.error_event_->type); in TEST_F()
1759 EXPECT_EQ(OmahaEvent::kResultUpdateDeferred, attempter_.error_event_->result); in TEST_F()
1763 EXPECT_EQ(expected_code, attempter_.error_event_->error_code); in TEST_F()
1765 attempter_.ProcessingDone(nullptr, ErrorCode::kOmahaUpdateDeferredPerPolicy); in TEST_F()
1769 attempter_.GetStatus(&status); in TEST_F()
1779 EXPECT_FALSE(attempter_.IsBusyOrUpdateScheduled()); in TEST_F()
1781 attempter_.status_ = UpdateStatus::UPDATE_AVAILABLE; in TEST_F()
1782 EXPECT_TRUE(attempter_.IsBusyOrUpdateScheduled()); in TEST_F()
1786 attempter_.SetUpdateAttemptFlags(UpdateAttemptFlags::kFlagRestrictDownload); in TEST_F()
1789 attempter_.OnUpdateScheduled(EvalStatus::kSucceeded, params); in TEST_F()
1792 attempter_.GetCurrentUpdateAttemptFlags()); in TEST_F()
1798 attempter_.OnUpdateScheduled(EvalStatus::kSucceeded, params); in TEST_F()
1805 attempter_.OnUpdateScheduled(EvalStatus::kSucceeded, params); in TEST_F()
1810 attempter_.SetUpdateAttemptFlags(UpdateAttemptFlags::kFlagRestrictDownload); in TEST_F()
1812 attempter_.CheckForUpdate("", "", UpdateAttemptFlags::kNone); in TEST_F()
1814 attempter_.GetCurrentUpdateAttemptFlags()); in TEST_F()
1818 attempter_.SetUpdateAttemptFlags(UpdateAttemptFlags::kNone); in TEST_F()
1822 attempter_.CheckForUpdate("", in TEST_F()
1827 attempter_.GetCurrentUpdateAttemptFlags()); in TEST_F()
1847 attempter_.policy_provider_ = std::move(mock_policy_provider); in ResetRollbackHappenedStart()
1848 attempter_.Update("", "", "", "", false, false, 0, false, false); in ResetRollbackHappenedStart()
1883 attempter_.install_plan_.reset(new InstallPlan); in TEST_F()
1884 attempter_.install_plan_->is_rollback = true; in TEST_F()
1889 attempter_.ProcessingDone(nullptr, ErrorCode::kSuccess); in TEST_F()
1893 attempter_.install_plan_.reset(new InstallPlan); in TEST_F()
1894 attempter_.install_plan_->is_rollback = false; in TEST_F()
1899 attempter_.ProcessingDone(nullptr, ErrorCode::kSuccess); in TEST_F()
1903 attempter_.install_plan_.reset(new InstallPlan); in TEST_F()
1904 attempter_.install_plan_->is_rollback = true; in TEST_F()
1905 attempter_.install_plan_->version = kRollbackVersion; in TEST_F()
1910 attempter_.ProcessingDone(nullptr, ErrorCode::kSuccess); in TEST_F()
1914 attempter_.install_plan_.reset(new InstallPlan); in TEST_F()
1915 attempter_.install_plan_->is_rollback = false; in TEST_F()
1916 attempter_.install_plan_->version = kRollbackVersion; in TEST_F()
1921 attempter_.ProcessingDone(nullptr, ErrorCode::kSuccess); in TEST_F()
1925 attempter_.install_plan_.reset(new InstallPlan); in TEST_F()
1926 attempter_.install_plan_->is_rollback = true; in TEST_F()
1927 attempter_.install_plan_->version = kRollbackVersion; in TEST_F()
1933 attempter_.CreatePendingErrorEvent(&action, ErrorCode::kRollbackNotPossible); in TEST_F()
1934 attempter_.ProcessingDone(nullptr, ErrorCode::kRollbackNotPossible); in TEST_F()
1938 attempter_.install_plan_.reset(new InstallPlan); in TEST_F()
1939 attempter_.install_plan_->is_rollback = false; in TEST_F()
1940 attempter_.install_plan_->version = kRollbackVersion; in TEST_F()
1946 attempter_.CreatePendingErrorEvent(&action, ErrorCode::kRollbackNotPossible); in TEST_F()
1947 attempter_.ProcessingDone(nullptr, ErrorCode::kRollbackNotPossible); in TEST_F()
1954 attempter_.ProcessingDone(nullptr, ErrorCode::kOmahaUpdateDeferredPerPolicy); in TEST_F()
1967 attempter_.ProcessingDone(nullptr, ErrorCode::kSuccess); in TEST_F()
1997 attempter_.ProcessingDone(nullptr, ErrorCode::kSuccess); in TEST_F()
2027 attempter_.ProcessingDone(nullptr, ErrorCode::kSuccess); in TEST_F()
2131 attempter_.error_event_.reset(new OmahaEvent(OmahaEvent::kTypeUpdateComplete, in TEST_F()
2155 attempter_.error_event_.reset(new OmahaEvent(OmahaEvent::kTypeUpdateComplete, in TEST_F()
2187 attempter_.policy_provider_.reset( in UpdateToQuickFixBuildStart()
2189 attempter_.Update("", "", "", "", false, false, 0, false, false); in UpdateToQuickFixBuildStart()
2191 EXPECT_EQ(token, attempter_.omaha_request_params_->autoupdate_token()); in UpdateToQuickFixBuildStart()
2215 EXPECT_TRUE(attempter_.ScheduleUpdates()); in TEST_F()
2218 EXPECT_FALSE(attempter_.ScheduleUpdates()); in TEST_F()
2219 EXPECT_FALSE(attempter_.ScheduleUpdates()); in TEST_F()
2220 EXPECT_FALSE(attempter_.ScheduleUpdates()); in TEST_F()
2230 attempter_.SetWaitingForScheduledCheck(true); in TestOnUpdateScheduled()
2231 attempter_.DisableUpdate(); in TestOnUpdateScheduled()
2232 attempter_.DisableScheduleUpdates(); in TestOnUpdateScheduled()
2235 attempter_.OnUpdateScheduled(ous_params_.status, ous_params_.params); in TestOnUpdateScheduled()
2238 EXPECT_EQ(ous_params_.exit_status, attempter_.status()); in TestOnUpdateScheduled()
2240 attempter_.WasScheduleUpdatesCalled()); in TestOnUpdateScheduled()
2241 EXPECT_EQ(ous_params_.should_update_be_called, attempter_.WasUpdateCalled()); in TestOnUpdateScheduled()
2299 attempter_.GetStatus(&status); in TEST_F()
2304 attempter_.install_plan_.reset(new InstallPlan); in TEST_F()
2305 attempter_.install_plan_->is_rollback = false; in TEST_F()
2308 attempter_.GetStatus(&status); in TEST_F()
2313 attempter_.install_plan_.reset(new InstallPlan); in TEST_F()
2314 attempter_.install_plan_->is_rollback = true; in TEST_F()
2317 attempter_.GetStatus(&status); in TEST_F()
2323 attempter_.GetStatus(&status); in TEST_F()
2328 attempter_.install_plan_.reset(new InstallPlan); in TEST_F()
2329 attempter_.install_plan_->powerwash_required = true; in TEST_F()
2332 attempter_.GetStatus(&status); in TEST_F()
2337 attempter_.install_plan_.reset(new InstallPlan); in TEST_F()
2338 attempter_.install_plan_->is_rollback = true; in TEST_F()
2341 attempter_.GetStatus(&status); in TEST_F()
2353 attempter_.GetStatus(&status); in TEST_F()
2365 attempter_.GetStatus(&status); in TEST_F()
2375 attempter_.GetStatus(&status); in TEST_F()
2383 attempter_.GetStatus(&status); in TEST_F()
2391 attempter_.is_install_ = true; in TEST_F()
2392 attempter_.dlc_ids_ = {dlc_id}; in TEST_F()
2393 attempter_.CalculateDlcParams(); in TEST_F()
2419 attempter_.is_install_ = false; in TEST_F()
2420 attempter_.CalculateDlcParams(); in TEST_F()
2452 attempter_.is_install_ = false; in TEST_F()
2453 attempter_.CalculateDlcParams(); in TEST_F()
2486 attempter_.is_install_ = false; in TEST_F()
2487 attempter_.CalculateDlcParams(); in TEST_F()
2518 attempter_.dlc_ids_ = {dlc_id}; in TEST_F()
2519 attempter_.is_install_ = true; in TEST_F()
2520 attempter_.CalculateDlcParams(); in TEST_F()
2535 attempter_.SetDlcActiveValue(true, dlc_id); in TEST_F()
2555 attempter_.SetDlcActiveValue(false, dlc_id); in TEST_F()
2564 attempter_.omaha_request_params_->set_dlc_apps_params( in TEST_F()
2568 EXPECT_THAT(attempter_.GetSuccessfulDlcIds(), ElementsAre(dlc_2)); in TEST_F()