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

Unified Diff: chrome/browser/chromeos/system/automatic_reboot_manager_unittest.cc

Issue 129303003: Revert of Revert of chromeos: Don't send empty power management policies. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/power/power_prefs_unittest.cc ('k') | chromeos/dbus/fake_power_manager_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/system/automatic_reboot_manager_unittest.cc
diff --git a/chrome/browser/chromeos/system/automatic_reboot_manager_unittest.cc b/chrome/browser/chromeos/system/automatic_reboot_manager_unittest.cc
index b655ddb1a52ed3fe0cf2c74e5ea0fa398a4823a3..b6e8eccd6160cc7bdd0154b9b39a86ef779df5c5 100644
--- a/chrome/browser/chromeos/system/automatic_reboot_manager_unittest.cc
+++ b/chrome/browser/chromeos/system/automatic_reboot_manager_unittest.cc
@@ -400,7 +400,7 @@
base::Value::CreateBooleanValue(reboot_after_update));
task_runner_->RunUntilIdle();
EXPECT_EQ(expect_reboot ? 1 : 0,
- power_manager_client_->request_restart_call_count());
+ power_manager_client_->num_request_restart_calls());
}
void AutomaticRebootManagerBasicTest::SetUptimeLimit(
@@ -416,7 +416,7 @@
}
task_runner_->RunUntilIdle();
EXPECT_EQ(expect_reboot ? 1 : 0,
- power_manager_client_->request_restart_call_count());
+ power_manager_client_->num_request_restart_calls());
}
void AutomaticRebootManagerBasicTest::NotifyUpdateRebootNeeded() {
@@ -424,14 +424,14 @@
automatic_reboot_manager_->UpdateStatusChanged(
update_engine_client_->GetLastStatus());
task_runner_->RunUntilIdle();
- EXPECT_EQ(0, power_manager_client_->request_restart_call_count());
+ EXPECT_EQ(0, power_manager_client_->num_request_restart_calls());
}
void AutomaticRebootManagerBasicTest::NotifyResumed(bool expect_reboot) {
automatic_reboot_manager_->SystemResumed(base::TimeDelta::FromHours(1));
task_runner_->RunUntilIdle();
EXPECT_EQ(expect_reboot ? 1 : 0,
- power_manager_client_->request_restart_call_count());
+ power_manager_client_->num_request_restart_calls());
}
void AutomaticRebootManagerBasicTest::NotifyTerminating(bool expect_reboot) {
@@ -441,7 +441,7 @@
content::NotificationService::NoDetails());
task_runner_->RunUntilIdle();
EXPECT_EQ(expect_reboot ? 1 : 0,
- power_manager_client_->request_restart_call_count());
+ power_manager_client_->num_request_restart_calls());
}
void AutomaticRebootManagerBasicTest::FastForwardBy(
@@ -449,14 +449,14 @@
bool expect_reboot) {
task_runner_->FastForwardBy(delta);
EXPECT_EQ(expect_reboot ? 1 : 0,
- power_manager_client_->request_restart_call_count());
+ power_manager_client_->num_request_restart_calls());
}
void AutomaticRebootManagerBasicTest::FastForwardUntilNoTasksRemain(
bool expect_reboot) {
task_runner_->FastForwardUntilNoTasksRemain();
EXPECT_EQ(expect_reboot ? 1 : 0,
- power_manager_client_->request_restart_call_count());
+ power_manager_client_->num_request_restart_calls());
}
void AutomaticRebootManagerBasicTest::CreateAutomaticRebootManager(
@@ -465,7 +465,7 @@
scoped_ptr<base::TickClock>(new MockTimeTickClock(task_runner_))));
task_runner_->RunUntilIdle();
EXPECT_EQ(expect_reboot ? 1 : 0,
- power_manager_client_->request_restart_call_count());
+ power_manager_client_->num_request_restart_calls());
uptime_processing_delay_ =
base::TimeTicks() - automatic_reboot_manager_->boot_time_ -
« no previous file with comments | « chrome/browser/chromeos/power/power_prefs_unittest.cc ('k') | chromeos/dbus/fake_power_manager_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698