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

Side by Side Diff: ash/common/system/chromeos/session/tray_session_length_limit_unittest.cc

Issue 2108793002: mash: Convert system tray logout button to wm common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more review comments, fix mash_unittests Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/system/chromeos/session/tray_session_length_limit.h" 5 #include "ash/common/system/chromeos/session/tray_session_length_limit.h"
6 6
7 #include "ash/root_window_controller.h"
8 #include "ash/shell.h"
9 #include "ash/system/tray/system_tray.h" 7 #include "ash/system/tray/system_tray.h"
10 #include "ash/test/ash_test_base.h" 8 #include "ash/test/ash_test_base.h"
11 #include "ash/test/test_system_tray_delegate.h" 9 #include "ash/test/test_system_tray_delegate.h"
12 #include "base/time/time.h" 10 #include "base/time/time.h"
13 #include "ui/message_center/message_center.h" 11 #include "ui/message_center/message_center.h"
14 #include "ui/message_center/notification.h" 12 #include "ui/message_center/notification.h"
15 #include "ui/message_center/notification_types.h" 13 #include "ui/message_center/notification_types.h"
16 14
17 namespace ash { 15 namespace ash {
18 namespace test { 16 namespace test {
19 17
20 class TraySessionLengthLimitTest : public AshTestBase { 18 class TraySessionLengthLimitTest : public AshTestBase {
21 public: 19 public:
22 TraySessionLengthLimitTest() {} 20 TraySessionLengthLimitTest() {}
23 ~TraySessionLengthLimitTest() override {} 21 ~TraySessionLengthLimitTest() override {}
24 22
25 void SetUp() override { 23 void SetUp() override {
26 AshTestBase::SetUp(); 24 AshTestBase::SetUp();
27 SystemTray* system_tray = 25 SystemTray* system_tray = GetPrimarySystemTray();
28 Shell::GetPrimaryRootWindowController()->GetSystemTray();
29 tray_session_length_limit_ = new TraySessionLengthLimit(system_tray); 26 tray_session_length_limit_ = new TraySessionLengthLimit(system_tray);
30 system_tray->AddTrayItem(tray_session_length_limit_); 27 system_tray->AddTrayItem(tray_session_length_limit_);
31 } 28 }
32 29
33 void TearDown() override { 30 void TearDown() override {
34 ClearSessionLengthLimit(); 31 ClearSessionLengthLimit();
35 AshTestBase::TearDown(); 32 AshTestBase::TearDown();
36 } 33 }
37 34
38 protected: 35 protected:
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 // re-appear and be re-read. 147 // re-appear and be re-read.
151 UpdateSessionLengthLimitInMin(15); 148 UpdateSessionLengthLimitInMin(15);
152 notification = GetNotification(); 149 notification = GetNotification();
153 EXPECT_TRUE(notification); 150 EXPECT_TRUE(notification);
154 EXPECT_TRUE(notification->rich_notification_data() 151 EXPECT_TRUE(notification->rich_notification_data()
155 .should_make_spoken_feedback_for_popup_updates); 152 .should_make_spoken_feedback_for_popup_updates);
156 } 153 }
157 154
158 } // namespace test 155 } // namespace test
159 } // namespace ash 156 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/chromeos/session/tray_session_length_limit.cc ('k') | ash/common/system/tray/label_tray_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698