| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/tray/system_tray.h" | 5 #include "ash/system/tray/system_tray.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "ash/accessibility_delegate.h" | 9 #include "ash/accessibility_delegate.h" |
| 10 #include "ash/root_window_controller.h" | 10 #include "ash/root_window_controller.h" |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 | 305 |
| 306 // Ensure a notification view is created. | 306 // Ensure a notification view is created. |
| 307 tray->ShowNotificationView(test_item); | 307 tray->ShowNotificationView(test_item); |
| 308 ASSERT_TRUE(test_item->notification_view() != NULL); | 308 ASSERT_TRUE(test_item->notification_view() != NULL); |
| 309 | 309 |
| 310 // Show the default view, notification view should remain. | 310 // Show the default view, notification view should remain. |
| 311 tray->ShowDefaultView(BUBBLE_CREATE_NEW); | 311 tray->ShowDefaultView(BUBBLE_CREATE_NEW); |
| 312 RunAllPendingInMessageLoop(); | 312 RunAllPendingInMessageLoop(); |
| 313 ASSERT_TRUE(test_item->notification_view() != NULL); | 313 ASSERT_TRUE(test_item->notification_view() != NULL); |
| 314 | 314 |
| 315 // Show the detailed view, ensure the notification view remains. | 315 // Show the detailed view, ensure the notificaiton view remains. |
| 316 tray->ShowDetailedView(detailed_item, 0, false, BUBBLE_CREATE_NEW); | 316 tray->ShowDetailedView(detailed_item, 0, false, BUBBLE_CREATE_NEW); |
| 317 RunAllPendingInMessageLoop(); | 317 RunAllPendingInMessageLoop(); |
| 318 ASSERT_TRUE(detailed_item->detailed_view() != NULL); | 318 ASSERT_TRUE(detailed_item->detailed_view() != NULL); |
| 319 ASSERT_TRUE(test_item->notification_view() != NULL); | 319 ASSERT_TRUE(test_item->notification_view() != NULL); |
| 320 | 320 |
| 321 // Hide the detailed view, ensure the notification view still exists. | 321 // Hide the detailed view, ensure the notification view still exists. |
| 322 ASSERT_TRUE(tray->CloseSystemBubble()); | 322 ASSERT_TRUE(tray->CloseSystemBubble()); |
| 323 RunAllPendingInMessageLoop(); | 323 RunAllPendingInMessageLoop(); |
| 324 ASSERT_TRUE(detailed_item->detailed_view() == NULL); | 324 ASSERT_TRUE(detailed_item->detailed_view() == NULL); |
| 325 ASSERT_TRUE(test_item->notification_view() != NULL); | 325 ASSERT_TRUE(test_item->notification_view() != NULL); |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 | 478 |
| 479 const views::View* settings = | 479 const views::View* settings = |
| 480 tray->GetSystemBubble()->bubble_view()->GetViewByID( | 480 tray->GetSystemBubble()->bubble_view()->GetViewByID( |
| 481 test::kSettingsTrayItemViewId); | 481 test::kSettingsTrayItemViewId); |
| 482 ASSERT_TRUE(settings); | 482 ASSERT_TRUE(settings); |
| 483 EXPECT_TRUE(settings->visible()); | 483 EXPECT_TRUE(settings->visible()); |
| 484 } | 484 } |
| 485 | 485 |
| 486 } // namespace test | 486 } // namespace test |
| 487 } // namespace ash | 487 } // namespace ash |
| OLD | NEW |