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); |