| 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 20 matching lines...) Expand all Loading... |
| 31 | 31 |
| 32 SystemTrayNotifier* GetSystemTrayNotifier() { | 32 SystemTrayNotifier* GetSystemTrayNotifier() { |
| 33 return Shell::GetInstance()->system_tray_notifier(); | 33 return Shell::GetInstance()->system_tray_notifier(); |
| 34 } | 34 } |
| 35 | 35 |
| 36 void ClickViewCenter(views::View* view) { | 36 void ClickViewCenter(views::View* view) { |
| 37 gfx::Point click_location_in_local = | 37 gfx::Point click_location_in_local = |
| 38 gfx::Point(view->width() / 2, view->height() / 2); | 38 gfx::Point(view->width() / 2, view->height() / 2); |
| 39 view->OnMousePressed(ui::MouseEvent( | 39 view->OnMousePressed(ui::MouseEvent( |
| 40 ui::ET_MOUSE_PRESSED, click_location_in_local, click_location_in_local, | 40 ui::ET_MOUSE_PRESSED, click_location_in_local, click_location_in_local, |
| 41 ui::EventTimeForNow(), ui::EF_NONE, ui::EF_NONE)); | 41 ui::EventTimeForNow(), ui::EF_NONE, ui::EF_NONE, |
| 42 ui::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_MOUSE))); |
| 42 } | 43 } |
| 43 | 44 |
| 44 class ScreenTrayItemTest : public ash::test::AshTestBase { | 45 class ScreenTrayItemTest : public ash::test::AshTestBase { |
| 45 public: | 46 public: |
| 46 ScreenTrayItemTest() | 47 ScreenTrayItemTest() |
| 47 : tray_item_(NULL), stop_callback_hit_count_(0) {} | 48 : tray_item_(NULL), stop_callback_hit_count_(0) {} |
| 48 ~ScreenTrayItemTest() override {} | 49 ~ScreenTrayItemTest() override {} |
| 49 | 50 |
| 50 ScreenTrayItem* tray_item() { return tray_item_; } | 51 ScreenTrayItem* tray_item() { return tray_item_; } |
| 51 void set_tray_item(ScreenTrayItem* tray_item) { tray_item_ = tray_item; } | 52 void set_tray_item(ScreenTrayItem* tray_item) { tray_item_ = tray_item; } |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after 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 |