| 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/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| (...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 729 } | 729 } |
| 730 | 730 |
| 731 #endif | 731 #endif |
| 732 | 732 |
| 733 TEST_F(WidgetTestInteractive, CanActivateFlagIsHonored) { | 733 TEST_F(WidgetTestInteractive, CanActivateFlagIsHonored) { |
| 734 Widget widget; | 734 Widget widget; |
| 735 Widget::InitParams init_params = | 735 Widget::InitParams init_params = |
| 736 CreateParams(Widget::InitParams::TYPE_WINDOW); | 736 CreateParams(Widget::InitParams::TYPE_WINDOW); |
| 737 init_params.bounds = gfx::Rect(0, 0, 200, 200); | 737 init_params.bounds = gfx::Rect(0, 0, 200, 200); |
| 738 init_params.ownership = Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; | 738 init_params.ownership = Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; |
| 739 init_params.activatable = Widget::InitParams::ACTIVATABLE_NO; | 739 init_params.can_activate = false; |
| 740 #if !defined(OS_CHROMEOS) | 740 #if !defined(OS_CHROMEOS) |
| 741 init_params.native_widget = new DesktopNativeWidgetAura(&widget); | 741 init_params.native_widget = new DesktopNativeWidgetAura(&widget); |
| 742 #endif // !defined(OS_CHROMEOS) | 742 #endif // !defined(OS_CHROMEOS) |
| 743 widget.Init(init_params); | 743 widget.Init(init_params); |
| 744 | 744 |
| 745 widget.Show(); | 745 widget.Show(); |
| 746 EXPECT_FALSE(widget.IsActive()); | 746 EXPECT_FALSE(widget.IsActive()); |
| 747 } | 747 } |
| 748 | 748 |
| 749 // Test that touch selection quick menu is not activated when opened. | 749 // Test that touch selection quick menu is not activated when opened. |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 965 ui::EventDispatchDetails details = widget1.GetNativeWindow()-> | 965 ui::EventDispatchDetails details = widget1.GetNativeWindow()-> |
| 966 GetHost()->event_processor()->OnEventFromSource(&mouse_event); | 966 GetHost()->event_processor()->OnEventFromSource(&mouse_event); |
| 967 ASSERT_FALSE(details.dispatcher_destroyed); | 967 ASSERT_FALSE(details.dispatcher_destroyed); |
| 968 EXPECT_TRUE(widget1.GetAndClearGotMouseEvent()); | 968 EXPECT_TRUE(widget1.GetAndClearGotMouseEvent()); |
| 969 EXPECT_FALSE(widget2.GetAndClearGotMouseEvent()); | 969 EXPECT_FALSE(widget2.GetAndClearGotMouseEvent()); |
| 970 } | 970 } |
| 971 #endif | 971 #endif |
| 972 | 972 |
| 973 } // namespace test | 973 } // namespace test |
| 974 } // namespace views | 974 } // namespace views |
| OLD | NEW |