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

Unified Diff: chrome/browser/chromeos/status/power_menu_button_browsertest.cc

Issue 8263003: cros: PowerLibrary virtual functions should be named using CamelCase. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix browser_tests Created 9 years, 2 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/status/power_menu_button.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/status/power_menu_button_browsertest.cc
diff --git a/chrome/browser/chromeos/status/power_menu_button_browsertest.cc b/chrome/browser/chromeos/status/power_menu_button_browsertest.cc
index 515c325b0cac397b779bddde0f08d45f637678df..175cede5f95b2e50e769cd49b912c482e559a31b 100644
--- a/chrome/browser/chromeos/status/power_menu_button_browsertest.cc
+++ b/chrome/browser/chromeos/status/power_menu_button_browsertest.cc
@@ -52,44 +52,44 @@ class PowerMenuButtonTest : public CrosInProcessBrowserTest {
};
IN_PROC_BROWSER_TEST_F(PowerMenuButtonTest, BatteryMissingTest) {
- EXPECT_CALL(*mock_power_library_, battery_is_present())
+ EXPECT_CALL(*mock_power_library_, IsBatteryPresent())
.WillOnce((Return(false))) // no battery
.RetiresOnSaturation();
- EXPECT_CALL(*mock_power_library_, battery_percentage())
+ EXPECT_CALL(*mock_power_library_, GetBatteryPercentage())
.WillOnce((Return(42.0)))
.RetiresOnSaturation();
- EXPECT_CALL(*mock_power_library_, battery_fully_charged())
+ EXPECT_CALL(*mock_power_library_, IsBatteryFullyCharged())
.WillOnce((Return(false)))
.RetiresOnSaturation();
- EXPECT_CALL(*mock_power_library_, line_power_on())
+ EXPECT_CALL(*mock_power_library_, IsLinePowerOn())
.WillOnce((Return(false)))
.RetiresOnSaturation();
- EXPECT_CALL(*mock_power_library_, battery_time_to_empty())
+ EXPECT_CALL(*mock_power_library_, GetBatteryTimeToEmpty())
.WillOnce((Return(base::TimeDelta::FromMinutes(42))))
.RetiresOnSaturation();
- EXPECT_CALL(*mock_power_library_, battery_time_to_full())
+ EXPECT_CALL(*mock_power_library_, GetBatteryTimeToFull())
.WillOnce((Return(base::TimeDelta::FromMinutes(24))))
.RetiresOnSaturation();
EXPECT_EQ(-1, CallPowerChangedAndGetBatteryIndex());
}
IN_PROC_BROWSER_TEST_F(PowerMenuButtonTest, BatteryChargedTest) {
- EXPECT_CALL(*mock_power_library_, battery_is_present())
+ EXPECT_CALL(*mock_power_library_, IsBatteryPresent())
.WillOnce((Return(true)))
.RetiresOnSaturation();
- EXPECT_CALL(*mock_power_library_, battery_percentage())
+ EXPECT_CALL(*mock_power_library_, GetBatteryPercentage())
.WillOnce((Return(42.0)))
.RetiresOnSaturation();
- EXPECT_CALL(*mock_power_library_, battery_fully_charged())
+ EXPECT_CALL(*mock_power_library_, IsBatteryFullyCharged())
.WillOnce((Return(true))) // fully charged
.RetiresOnSaturation();
- EXPECT_CALL(*mock_power_library_, line_power_on())
+ EXPECT_CALL(*mock_power_library_, IsLinePowerOn())
.WillOnce((Return(true))) // plugged in
.RetiresOnSaturation();
- EXPECT_CALL(*mock_power_library_, battery_time_to_empty())
+ EXPECT_CALL(*mock_power_library_, GetBatteryTimeToEmpty())
.WillOnce((Return(base::TimeDelta::FromMinutes(42))))
.RetiresOnSaturation();
- EXPECT_CALL(*mock_power_library_, battery_time_to_full())
+ EXPECT_CALL(*mock_power_library_, GetBatteryTimeToFull())
.WillOnce((Return(base::TimeDelta::FromMinutes(0))))
.RetiresOnSaturation();
EXPECT_EQ(kNumBatteryStates - 1, CallPowerChangedAndGetBatteryIndex());
@@ -97,30 +97,30 @@ IN_PROC_BROWSER_TEST_F(PowerMenuButtonTest, BatteryChargedTest) {
IN_PROC_BROWSER_TEST_F(PowerMenuButtonTest, BatteryChargingTest) {
const int NUM_TIMES = 19;
- EXPECT_CALL(*mock_power_library_, battery_is_present())
+ EXPECT_CALL(*mock_power_library_, IsBatteryPresent())
.Times(NUM_TIMES)
.WillRepeatedly((Return(true)))
.RetiresOnSaturation();
- EXPECT_CALL(*mock_power_library_, battery_fully_charged())
+ EXPECT_CALL(*mock_power_library_, IsBatteryFullyCharged())
.Times(NUM_TIMES)
.WillRepeatedly((Return(false)))
.RetiresOnSaturation();
- EXPECT_CALL(*mock_power_library_, line_power_on())
+ EXPECT_CALL(*mock_power_library_, IsLinePowerOn())
.Times(NUM_TIMES)
.WillRepeatedly((Return(true))) // plugged in
.RetiresOnSaturation();
- EXPECT_CALL(*mock_power_library_, battery_time_to_empty())
+ EXPECT_CALL(*mock_power_library_, GetBatteryTimeToEmpty())
.Times(NUM_TIMES)
.WillRepeatedly((Return(base::TimeDelta::FromMinutes(42))))
.RetiresOnSaturation();
- EXPECT_CALL(*mock_power_library_, battery_time_to_full())
+ EXPECT_CALL(*mock_power_library_, GetBatteryTimeToFull())
.Times(NUM_TIMES)
.WillRepeatedly((Return(base::TimeDelta::FromMinutes(24))))
.RetiresOnSaturation();
int index = 0;
for (float percent = 5.0; percent < 100.0; percent += 5.0) {
- EXPECT_CALL(*mock_power_library_, battery_percentage())
+ EXPECT_CALL(*mock_power_library_, GetBatteryPercentage())
.WillOnce((Return(percent)))
.RetiresOnSaturation();
EXPECT_EQ(index, CallPowerChangedAndGetBatteryIndex());
@@ -130,30 +130,30 @@ IN_PROC_BROWSER_TEST_F(PowerMenuButtonTest, BatteryChargingTest) {
IN_PROC_BROWSER_TEST_F(PowerMenuButtonTest, BatteryDischargingTest) {
const int NUM_TIMES = 19;
- EXPECT_CALL(*mock_power_library_, battery_is_present())
+ EXPECT_CALL(*mock_power_library_, IsBatteryPresent())
.Times(NUM_TIMES)
.WillRepeatedly((Return(true)))
.RetiresOnSaturation();
- EXPECT_CALL(*mock_power_library_, battery_fully_charged())
+ EXPECT_CALL(*mock_power_library_, IsBatteryFullyCharged())
.Times(NUM_TIMES)
.WillRepeatedly((Return(false)))
.RetiresOnSaturation();
- EXPECT_CALL(*mock_power_library_, line_power_on())
+ EXPECT_CALL(*mock_power_library_, IsLinePowerOn())
.Times(NUM_TIMES)
.WillRepeatedly((Return(false)))
.RetiresOnSaturation();
- EXPECT_CALL(*mock_power_library_, battery_time_to_empty())
+ EXPECT_CALL(*mock_power_library_, GetBatteryTimeToEmpty())
.Times(NUM_TIMES)
.WillRepeatedly((Return(base::TimeDelta::FromMinutes(42))))
.RetiresOnSaturation();
- EXPECT_CALL(*mock_power_library_, battery_time_to_full())
+ EXPECT_CALL(*mock_power_library_, GetBatteryTimeToFull())
.Times(NUM_TIMES)
.WillRepeatedly((Return(base::TimeDelta::FromMinutes(24))))
.RetiresOnSaturation();
int index = 0;
for (float percent = 5.0; percent < 100.0; percent += 5.0) {
- EXPECT_CALL(*mock_power_library_, battery_percentage())
+ EXPECT_CALL(*mock_power_library_, GetBatteryPercentage())
.WillOnce((Return(percent)))
.RetiresOnSaturation();
EXPECT_EQ(index, CallPowerChangedAndGetBatteryIndex());
« no previous file with comments | « chrome/browser/chromeos/status/power_menu_button.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698