| 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/common/system/chromeos/screen_security/screen_tray_item.h" |
| 6 | 6 |
| 7 #include "ash/common/system/chromeos/screen_security/screen_capture_tray_item.h" |
| 8 #include "ash/common/system/chromeos/screen_security/screen_share_tray_item.h" |
| 7 #include "ash/common/system/tray/system_tray_notifier.h" | 9 #include "ash/common/system/tray/system_tray_notifier.h" |
| 8 #include "ash/common/system/tray/tray_item_view.h" | 10 #include "ash/common/system/tray/tray_item_view.h" |
| 9 #include "ash/common/wm_shell.h" | 11 #include "ash/common/wm_shell.h" |
| 10 #include "ash/system/chromeos/screen_security/screen_capture_tray_item.h" | |
| 11 #include "ash/system/chromeos/screen_security/screen_share_tray_item.h" | |
| 12 #include "ash/test/ash_test_base.h" | 12 #include "ash/test/ash_test_base.h" |
| 13 #include "base/callback.h" | 13 #include "base/callback.h" |
| 14 #include "base/strings/utf_string_conversions.h" | 14 #include "base/strings/utf_string_conversions.h" |
| 15 #include "ui/events/event.h" | 15 #include "ui/events/event.h" |
| 16 #include "ui/events/event_utils.h" | 16 #include "ui/events/event_utils.h" |
| 17 #include "ui/gfx/geometry/point.h" | 17 #include "ui/gfx/geometry/point.h" |
| 18 #include "ui/message_center/message_center.h" | 18 #include "ui/message_center/message_center.h" |
| 19 #include "ui/views/view.h" | 19 #include "ui/views/view.h" |
| 20 | 20 |
| 21 namespace ash { | 21 namespace ash { |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 | 72 |
| 73 void SetUp() override { | 73 void SetUp() override { |
| 74 ScreenTrayItemTest::SetUp(); | 74 ScreenTrayItemTest::SetUp(); |
| 75 // This tray item is owned by its parent system tray view and will | 75 // This tray item is owned by its parent system tray view and will |
| 76 // be deleted automatically when its parent is destroyed in AshTestBase. | 76 // be deleted automatically when its parent is destroyed in AshTestBase. |
| 77 ScreenTrayItem* item = new ScreenCaptureTrayItem(GetPrimarySystemTray()); | 77 ScreenTrayItem* item = new ScreenCaptureTrayItem(GetPrimarySystemTray()); |
| 78 GetPrimarySystemTray()->AddTrayItem(item); | 78 GetPrimarySystemTray()->AddTrayItem(item); |
| 79 set_tray_item(item); | 79 set_tray_item(item); |
| 80 } | 80 } |
| 81 | 81 |
| 82 private: |
| 82 DISALLOW_COPY_AND_ASSIGN(ScreenCaptureTest); | 83 DISALLOW_COPY_AND_ASSIGN(ScreenCaptureTest); |
| 83 }; | 84 }; |
| 84 | 85 |
| 85 class ScreenShareTest : public ScreenTrayItemTest { | 86 class ScreenShareTest : public ScreenTrayItemTest { |
| 86 public: | 87 public: |
| 87 ScreenShareTest() {} | 88 ScreenShareTest() {} |
| 88 ~ScreenShareTest() override {} | 89 ~ScreenShareTest() override {} |
| 89 | 90 |
| 90 void SetUp() override { | 91 void SetUp() override { |
| 91 ScreenTrayItemTest::SetUp(); | 92 ScreenTrayItemTest::SetUp(); |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 | 211 |
| 211 TEST_F(ScreenCaptureTest, SystemTrayInteraction) { | 212 TEST_F(ScreenCaptureTest, SystemTrayInteraction) { |
| 212 TestSystemTrayInteraction(this); | 213 TestSystemTrayInteraction(this); |
| 213 } | 214 } |
| 214 | 215 |
| 215 TEST_F(ScreenShareTest, SystemTrayInteraction) { | 216 TEST_F(ScreenShareTest, SystemTrayInteraction) { |
| 216 TestSystemTrayInteraction(this); | 217 TestSystemTrayInteraction(this); |
| 217 } | 218 } |
| 218 | 219 |
| 219 } // namespace ash | 220 } // namespace ash |
| OLD | NEW |