OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/bind.h" | 6 #include "base/bind.h" |
7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
8 #include "ui/gfx/native_widget_types.h" | 8 #include "ui/gfx/native_widget_types.h" |
9 #include "ui/views/test/widget_test.h" | 9 #include "ui/views/test/widget_test.h" |
10 #include "ui/views/widget/widget.h" | 10 #include "ui/views/widget/widget.h" |
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
650 } | 650 } |
651 | 651 |
652 DISALLOW_COPY_AND_ASSIGN(WidgetCaptureTest); | 652 DISALLOW_COPY_AND_ASSIGN(WidgetCaptureTest); |
653 }; | 653 }; |
654 | 654 |
655 // See description in TestCapture(). | 655 // See description in TestCapture(). |
656 TEST_F(WidgetCaptureTest, Capture) { | 656 TEST_F(WidgetCaptureTest, Capture) { |
657 TestCapture(false); | 657 TestCapture(false); |
658 } | 658 } |
659 | 659 |
660 #if defined(USE_AURA) && !defined(OS_CHROMEOS) | 660 #if defined(USE_AURA) && !defined(OS_LINUX) |
661 // See description in TestCapture(). Creates DesktopNativeWidget. | 661 // See description in TestCapture(). Creates DesktopNativeWidget. |
662 TEST_F(WidgetCaptureTest, CaptureDesktopNativeWidget) { | 662 TEST_F(WidgetCaptureTest, CaptureDesktopNativeWidget) { |
663 TestCapture(true); | 663 TestCapture(true); |
664 } | 664 } |
665 #endif | 665 #endif |
666 | 666 |
667 #if defined(USE_AURA) && !defined(OS_CHROMEOS) | 667 #if defined(USE_AURA) && !defined(OS_CHROMEOS) |
668 namespace { | 668 namespace { |
669 | 669 |
670 // Used to veirfy OnMouseEvent() has been invoked. | 670 // Used to veirfy OnMouseEvent() has been invoked. |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
734 ui::EF_NONE); | 734 ui::EF_NONE); |
735 widget1.GetNativeWindow()->GetDispatcher()->AsRootWindowHostDelegate()-> | 735 widget1.GetNativeWindow()->GetDispatcher()->AsRootWindowHostDelegate()-> |
736 OnHostMouseEvent(&mouse_event); | 736 OnHostMouseEvent(&mouse_event); |
737 EXPECT_TRUE(widget1.GetAndClearGotMouseEvent()); | 737 EXPECT_TRUE(widget1.GetAndClearGotMouseEvent()); |
738 EXPECT_FALSE(widget2.GetAndClearGotMouseEvent()); | 738 EXPECT_FALSE(widget2.GetAndClearGotMouseEvent()); |
739 } | 739 } |
740 #endif | 740 #endif |
741 | 741 |
742 } // namespace test | 742 } // namespace test |
743 } // namespace views | 743 } // namespace views |
OLD | NEW |