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

Unified Diff: chrome/browser/chromeos/power/peripheral_battery_observer_browsertest.cc

Issue 20136004: Allow partial update for notification update API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix trybots Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/power/peripheral_battery_observer_browsertest.cc
diff --git a/chrome/browser/chromeos/power/peripheral_battery_observer_browsertest.cc b/chrome/browser/chromeos/power/peripheral_battery_observer_browsertest.cc
index ba280d7ca07462b47b8d827e035695fa202e0984..07dcb67a8fdaa56e01273b77d0e479c3426ecb22 100644
--- a/chrome/browser/chromeos/power/peripheral_battery_observer_browsertest.cc
+++ b/chrome/browser/chromeos/power/peripheral_battery_observer_browsertest.cc
@@ -82,7 +82,7 @@ IN_PROC_BROWSER_TEST_F(PeripheralBatteryObserverTest, Basic) {
EXPECT_EQ(info.name, kTestDeviceName);
EXPECT_EQ(info.level, 50);
EXPECT_EQ(info.last_notification_timestamp, base::TimeTicks());
- EXPECT_FALSE(notification_manager->DoesIdExist(kTestBatteryAddress));
+ EXPECT_FALSE(notification_manager->DoesIdExist(kTestBatteryAddress, NULL));
// Level 5 at time 110, low-battery notification.
clock.Advance(base::TimeDelta::FromSeconds(10));
@@ -90,7 +90,7 @@ IN_PROC_BROWSER_TEST_F(PeripheralBatteryObserverTest, Basic) {
kTestDeviceName, 5);
EXPECT_EQ(info.level, 5);
EXPECT_EQ(info.last_notification_timestamp, clock.NowTicks());
- EXPECT_TRUE(notification_manager->DoesIdExist(kTestBatteryAddress));
+ EXPECT_TRUE(notification_manager->DoesIdExist(kTestBatteryAddress, NULL));
// Level -1 at time 115, cancel previous notification
clock.Advance(base::TimeDelta::FromSeconds(5));
@@ -99,7 +99,7 @@ IN_PROC_BROWSER_TEST_F(PeripheralBatteryObserverTest, Basic) {
EXPECT_EQ(info.level, 5);
EXPECT_EQ(info.last_notification_timestamp,
clock.NowTicks() - base::TimeDelta::FromSeconds(5));
- EXPECT_FALSE(notification_manager->DoesIdExist(kTestBatteryAddress));
+ EXPECT_FALSE(notification_manager->DoesIdExist(kTestBatteryAddress, NULL));
// Level 50 at time 120, no low-battery notification.
clock.Advance(base::TimeDelta::FromSeconds(5));
@@ -108,7 +108,7 @@ IN_PROC_BROWSER_TEST_F(PeripheralBatteryObserverTest, Basic) {
EXPECT_EQ(info.level, 50);
EXPECT_EQ(info.last_notification_timestamp,
clock.NowTicks() - base::TimeDelta::FromSeconds(10));
- EXPECT_FALSE(notification_manager->DoesIdExist(kTestBatteryAddress));
+ EXPECT_FALSE(notification_manager->DoesIdExist(kTestBatteryAddress, NULL));
// Level 5 at time 130, no low-battery notification (throttling).
clock.Advance(base::TimeDelta::FromSeconds(10));
@@ -117,7 +117,7 @@ IN_PROC_BROWSER_TEST_F(PeripheralBatteryObserverTest, Basic) {
EXPECT_EQ(info.level, 5);
EXPECT_EQ(info.last_notification_timestamp,
clock.NowTicks() - base::TimeDelta::FromSeconds(20));
- EXPECT_FALSE(notification_manager->DoesIdExist(kTestBatteryAddress));
+ EXPECT_FALSE(notification_manager->DoesIdExist(kTestBatteryAddress, NULL));
}
IN_PROC_BROWSER_TEST_F(PeripheralBatteryObserverTest, InvalidBatteryInfo) {
@@ -149,10 +149,10 @@ IN_PROC_BROWSER_TEST_F(PeripheralBatteryObserverTest, DeviceRemove) {
observer_->PeripheralBatteryStatusReceived(kTestBatteryPath,
kTestDeviceName, 5);
EXPECT_EQ(observer_->batteries_.count(kTestBatteryAddress), 1u);
- EXPECT_TRUE(notification_manager->DoesIdExist(kTestBatteryAddress));
+ EXPECT_TRUE(notification_manager->DoesIdExist(kTestBatteryAddress, NULL));
observer_->RemoveBattery(kTestBatteryAddress);
- EXPECT_FALSE(notification_manager->DoesIdExist(kTestBatteryAddress));
+ EXPECT_FALSE(notification_manager->DoesIdExist(kTestBatteryAddress, NULL));
}
} // namespace chromeos

Powered by Google App Engine
This is Rietveld 408576698