OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/screen_security/screen_tray_item.h" | 5 #include "ash/system/chromeos/screen_security/screen_tray_item.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/system/chromeos/screen_security/screen_capture_tray_item.h" | 8 #include "ash/system/chromeos/screen_security/screen_capture_tray_item.h" |
9 #include "ash/system/chromeos/screen_security/screen_share_tray_item.h" | 9 #include "ash/system/chromeos/screen_security/screen_share_tray_item.h" |
10 #include "ash/system/tray/tray_item_view.h" | 10 #include "ash/system/tray/tray_item_view.h" |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 | 174 |
175 TestNotificationStartAndStop(this, start_func, stop_func); | 175 TestNotificationStartAndStop(this, start_func, stop_func); |
176 } | 176 } |
177 | 177 |
178 void TestNotificationView(ScreenTrayItemTest* test) { | 178 void TestNotificationView(ScreenTrayItemTest* test) { |
179 ScreenTrayItem* tray_item = test->tray_item(); | 179 ScreenTrayItem* tray_item = test->tray_item(); |
180 | 180 |
181 test->StartSession(); | 181 test->StartSession(); |
182 message_center::MessageCenter* message_center = | 182 message_center::MessageCenter* message_center = |
183 message_center::MessageCenter::Get(); | 183 message_center::MessageCenter::Get(); |
184 EXPECT_TRUE(message_center->HasNotification(tray_item->GetNotificationId())); | 184 EXPECT_TRUE(message_center->FindVisibleNotificationById( |
| 185 tray_item->GetNotificationId())); |
185 test->StopSession(); | 186 test->StopSession(); |
186 } | 187 } |
187 | 188 |
188 TEST_F(ScreenCaptureTest, NotificationView) { TestNotificationView(this); } | 189 TEST_F(ScreenCaptureTest, NotificationView) { TestNotificationView(this); } |
189 TEST_F(ScreenShareTest, NotificationView) { TestNotificationView(this); } | 190 TEST_F(ScreenShareTest, NotificationView) { TestNotificationView(this); } |
190 | 191 |
191 void TestSystemTrayInteraction(ScreenTrayItemTest* test) { | 192 void TestSystemTrayInteraction(ScreenTrayItemTest* test) { |
192 ScreenTrayItem* tray_item = test->tray_item(); | 193 ScreenTrayItem* tray_item = test->tray_item(); |
193 EXPECT_FALSE(tray_item->tray_view()->visible()); | 194 EXPECT_FALSE(tray_item->tray_view()->visible()); |
194 | 195 |
(...skipping 21 matching lines...) Expand all Loading... |
216 | 217 |
217 TEST_F(ScreenCaptureTest, SystemTrayInteraction) { | 218 TEST_F(ScreenCaptureTest, SystemTrayInteraction) { |
218 TestSystemTrayInteraction(this); | 219 TestSystemTrayInteraction(this); |
219 } | 220 } |
220 | 221 |
221 TEST_F(ScreenShareTest, SystemTrayInteraction) { | 222 TEST_F(ScreenShareTest, SystemTrayInteraction) { |
222 TestSystemTrayInteraction(this); | 223 TestSystemTrayInteraction(this); |
223 } | 224 } |
224 | 225 |
225 } // namespace ash | 226 } // namespace ash |
OLD | NEW |