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

Unified Diff: ash/system/chromeos/session/tray_session_length_limit_unittest.cc

Issue 895863002: Fixes tray_session_length_limit_unittest timeout on valgrind. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/chromeos/session/tray_session_length_limit_unittest.cc
diff --git a/ash/system/chromeos/session/tray_session_length_limit_unittest.cc b/ash/system/chromeos/session/tray_session_length_limit_unittest.cc
index e1152ce6f3622ad8a12d8478381b8e398e67ceb5..da203a5455fd0093aa635249e405349a15834438 100644
--- a/ash/system/chromeos/session/tray_session_length_limit_unittest.cc
+++ b/ash/system/chromeos/session/tray_session_length_limit_unittest.cc
@@ -30,7 +30,10 @@ class TraySessionLengthLimitTest : public AshTestBase {
system_tray->AddTrayItem(tray_session_length_limit_);
}
- void TearDown() override { AshTestBase::TearDown(); }
+ void TearDown() override {
+ ClearSessionLengthLimit();
+ AshTestBase::TearDown();
+ }
protected:
void UpdateSessionLengthLimitInMin(int mins) {
@@ -47,7 +50,7 @@ class TraySessionLengthLimitTest : public AshTestBase {
if ((*iter)->id() == TraySessionLengthLimit::kNotificationId)
return *iter;
}
- return NULL;
+ return nullptr;
}
void ClearSessionLengthLimit() {
@@ -120,8 +123,6 @@ TEST_F(TraySessionLengthLimitTest, Notification) {
}
TEST_F(TraySessionLengthLimitTest, RemoveNotification) {
- message_center::Notification* notification;
-
// Limit is 15 min.
UpdateSessionLengthLimitInMin(15);
EXPECT_TRUE(GetNotification());
@@ -137,7 +138,7 @@ TEST_F(TraySessionLengthLimitTest, RemoveNotification) {
// Limit is 3 min. The notification should re-appear and should be re-read
// because of state change.
UpdateSessionLengthLimitInMin(3);
- notification = GetNotification();
+ message_center::Notification* notification = GetNotification();
EXPECT_TRUE(notification);
EXPECT_TRUE(notification->rich_notification_data().
should_make_spoken_feedback_for_popup_updates);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698