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/common/system/web_notification/web_notification_tray.h" | 5 #include "ash/common/system/web_notification/web_notification_tray.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "ash/common/shelf/wm_shelf.h" | 10 #include "ash/common/shelf/wm_shelf.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 return GetTray()->message_center(); | 62 return GetTray()->message_center(); |
63 } | 63 } |
64 | 64 |
65 SystemTray* GetSystemTray() { | 65 SystemTray* GetSystemTray() { |
66 return StatusAreaWidgetTestHelper::GetStatusAreaWidget()->system_tray(); | 66 return StatusAreaWidgetTestHelper::GetStatusAreaWidget()->system_tray(); |
67 } | 67 } |
68 | 68 |
69 // Trivial item implementation for testing PopupAndSystemTray test case. | 69 // Trivial item implementation for testing PopupAndSystemTray test case. |
70 class TestItem : public SystemTrayItem { | 70 class TestItem : public SystemTrayItem { |
71 public: | 71 public: |
72 TestItem() : SystemTrayItem(GetSystemTray()) {} | 72 TestItem() : SystemTrayItem(GetSystemTray(), UMA_TEST) {} |
73 | 73 |
74 views::View* CreateDefaultView(LoginStatus status) override { | 74 views::View* CreateDefaultView(LoginStatus status) override { |
75 views::View* default_view = new views::View; | 75 views::View* default_view = new views::View; |
76 default_view->SetLayoutManager(new views::FillLayout); | 76 default_view->SetLayoutManager(new views::FillLayout); |
77 default_view->AddChildView(new views::Label(base::UTF8ToUTF16("Default"))); | 77 default_view->AddChildView(new views::Label(base::UTF8ToUTF16("Default"))); |
78 return default_view; | 78 return default_view; |
79 } | 79 } |
80 | 80 |
81 views::View* CreateNotificationView(LoginStatus status) override { | 81 views::View* CreateNotificationView(LoginStatus status) override { |
82 return new views::View; | 82 return new views::View; |
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
522 ui::ET_TOUCH_RELEASED, out_of_bounds, touch_id, | 522 ui::ET_TOUCH_RELEASED, out_of_bounds, touch_id, |
523 move.time_stamp() + base::TimeDelta::FromMilliseconds(50)); | 523 move.time_stamp() + base::TimeDelta::FromMilliseconds(50)); |
524 generator.Dispatch(&release); | 524 generator.Dispatch(&release); |
525 EXPECT_FALSE(tray->draw_background_as_active()); | 525 EXPECT_FALSE(tray->draw_background_as_active()); |
526 EXPECT_FALSE(tray->IsMessageCenterBubbleVisible()); | 526 EXPECT_FALSE(tray->IsMessageCenterBubbleVisible()); |
527 } | 527 } |
528 | 528 |
529 #endif // OS_CHROMEOS | 529 #endif // OS_CHROMEOS |
530 | 530 |
531 } // namespace ash | 531 } // namespace ash |
OLD | NEW |