Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(527)

Side by Side Diff: ui/views/widget/widget_interactive_uitest.cc

Issue 297503003: Revert: [Refactor] Consolidate the logic for whether a widget can be activated. This is a first ste (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/views/widget/widget_hwnd_utils.cc ('k') | ui/views/widget/widget_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ui/views/widget/widget_hwnd_utils.cc ('k') | ui/views/widget/widget_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698