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 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
752 init_params.native_widget = new PlatformDesktopNativeWidget(&widget); | 752 init_params.native_widget = new PlatformDesktopNativeWidget(&widget); |
753 #endif // !defined(OS_CHROMEOS) | 753 #endif // !defined(OS_CHROMEOS) |
754 widget.Init(init_params); | 754 widget.Init(init_params); |
755 | 755 |
756 widget.Show(); | 756 widget.Show(); |
757 EXPECT_FALSE(widget.IsActive()); | 757 EXPECT_FALSE(widget.IsActive()); |
758 } | 758 } |
759 | 759 |
760 // Test that touch selection quick menu is not activated when opened. | 760 // Test that touch selection quick menu is not activated when opened. |
761 TEST_F(WidgetTestInteractive, TouchSelectionQuickMenuIsNotActivated) { | 761 TEST_F(WidgetTestInteractive, TouchSelectionQuickMenuIsNotActivated) { |
762 CommandLine::ForCurrentProcess()->AppendSwitch(switches::kEnableTouchEditing); | 762 base::CommandLine::ForCurrentProcess()->AppendSwitch( |
| 763 switches::kEnableTouchEditing); |
763 #if defined(OS_WIN) | 764 #if defined(OS_WIN) |
764 views_delegate().set_use_desktop_native_widgets(true); | 765 views_delegate().set_use_desktop_native_widgets(true); |
765 #endif // !defined(OS_WIN) | 766 #endif // !defined(OS_WIN) |
766 | 767 |
767 Widget widget; | 768 Widget widget; |
768 Widget::InitParams init_params = | 769 Widget::InitParams init_params = |
769 CreateParams(Widget::InitParams::TYPE_WINDOW_FRAMELESS); | 770 CreateParams(Widget::InitParams::TYPE_WINDOW_FRAMELESS); |
770 init_params.bounds = gfx::Rect(0, 0, 200, 200); | 771 init_params.bounds = gfx::Rect(0, 0, 200, 200); |
771 init_params.ownership = Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; | 772 init_params.ownership = Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; |
772 widget.Init(init_params); | 773 widget.Init(init_params); |
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1160 ui::EventDispatchDetails details = widget1.GetNativeWindow()-> | 1161 ui::EventDispatchDetails details = widget1.GetNativeWindow()-> |
1161 GetHost()->event_processor()->OnEventFromSource(&mouse_event); | 1162 GetHost()->event_processor()->OnEventFromSource(&mouse_event); |
1162 ASSERT_FALSE(details.dispatcher_destroyed); | 1163 ASSERT_FALSE(details.dispatcher_destroyed); |
1163 EXPECT_TRUE(widget1.GetAndClearGotMouseEvent()); | 1164 EXPECT_TRUE(widget1.GetAndClearGotMouseEvent()); |
1164 EXPECT_FALSE(widget2.GetAndClearGotMouseEvent()); | 1165 EXPECT_FALSE(widget2.GetAndClearGotMouseEvent()); |
1165 } | 1166 } |
1166 #endif // defined(OS_WIN) | 1167 #endif // defined(OS_WIN) |
1167 | 1168 |
1168 } // namespace test | 1169 } // namespace test |
1169 } // namespace views | 1170 } // namespace views |
OLD | NEW |