Home | History | Annotate | Download | only in power

Lines Matching refs:TrayPower

52   TrayPower* tray_power() { return tray_power_.get(); }
58 tray_power_.reset(new TrayPower(NULL, message_center_.get()));
67 TrayPower::NotificationState notification_state() const {
101 scoped_ptr<TrayPower> tray_power_;
146 EXPECT_EQ(TrayPower::NOTIFICATION_NONE, notification_state());
152 EXPECT_EQ(TrayPower::NOTIFICATION_NONE, notification_state());
161 EXPECT_EQ(TrayPower::NOTIFICATION_NONE, notification_state());
166 low.set_battery_time_to_empty_sec(TrayPower::kLowPowerMinutes * 60 + 30);
168 EXPECT_EQ(TrayPower::NOTIFICATION_NONE, notification_state());
172 low.set_battery_time_to_empty_sec(TrayPower::kLowPowerMinutes * 60 + 29);
174 EXPECT_EQ(TrayPower::NOTIFICATION_LOW_POWER, notification_state());
177 low.set_battery_time_to_empty_sec(TrayPower::kLowPowerMinutes * 60 - 20);
179 EXPECT_EQ(TrayPower::NOTIFICATION_LOW_POWER, notification_state());
184 critical.set_battery_time_to_empty_sec(TrayPower::kCriticalMinutes * 60 + 29);
186 EXPECT_EQ(TrayPower::NOTIFICATION_CRITICAL, notification_state());
191 safe.set_battery_time_to_empty_sec(TrayPower::kNoWarningMinutes * 60 - 29);
193 EXPECT_EQ(TrayPower::NOTIFICATION_NONE, notification_state());
199 low_usb.set_battery_percent(TrayPower::kLowPowerPercentage + 0.5);
201 EXPECT_EQ(TrayPower::NOTIFICATION_NONE, notification_state());
203 low_usb.set_battery_percent(TrayPower::kLowPowerPercentage + 0.49);
205 EXPECT_EQ(TrayPower::NOTIFICATION_LOW_POWER, notification_state());
210 critical_usb.set_battery_percent(TrayPower::kCriticalPercentage + 0.2);
212 EXPECT_EQ(TrayPower::NOTIFICATION_CRITICAL, notification_state());
217 safe_usb.set_battery_percent(TrayPower::kNoWarningPercentage - 0.1);
219 EXPECT_EQ(TrayPower::NOTIFICATION_NONE, notification_state());
231 EXPECT_EQ(TrayPower::NOTIFICATION_NONE, notification_state());