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

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

Issue 147203004: aura: Remove event-dispatch methods from WindowTreeHostDelegate interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: win Created 6 years, 10 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/native_widget_aura_unittest.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/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 762 matching lines...) Expand 10 before | Expand all | Expand 10 after
773 widget2.SetCapture(widget2.GetRootView()); 773 widget2.SetCapture(widget2.GetRootView());
774 EXPECT_FALSE(widget1.HasCapture()); 774 EXPECT_FALSE(widget1.HasCapture());
775 EXPECT_TRUE(widget2.HasCapture()); 775 EXPECT_TRUE(widget2.HasCapture());
776 776
777 widget1.GetAndClearGotMouseEvent(); 777 widget1.GetAndClearGotMouseEvent();
778 widget2.GetAndClearGotMouseEvent(); 778 widget2.GetAndClearGotMouseEvent();
779 // Send a mouse event to the RootWindow associated with |widget1|. Even though 779 // Send a mouse event to the RootWindow associated with |widget1|. Even though
780 // |widget2| has capture, |widget1| should still get the event. 780 // |widget2| has capture, |widget1| should still get the event.
781 ui::MouseEvent mouse_event(ui::ET_MOUSE_EXITED, gfx::Point(), gfx::Point(), 781 ui::MouseEvent mouse_event(ui::ET_MOUSE_EXITED, gfx::Point(), gfx::Point(),
782 ui::EF_NONE, ui::EF_NONE); 782 ui::EF_NONE, ui::EF_NONE);
783 widget1.GetNativeWindow()->GetDispatcher()->AsWindowTreeHostDelegate()-> 783 ui::EventDispatchDetails details = widget1.GetNativeWindow()->
784 OnHostMouseEvent(&mouse_event); 784 GetDispatcher()->OnEventFromSource(&mouse_event);
785 ASSERT_FALSE(details.dispatcher_destroyed);
785 EXPECT_TRUE(widget1.GetAndClearGotMouseEvent()); 786 EXPECT_TRUE(widget1.GetAndClearGotMouseEvent());
786 EXPECT_FALSE(widget2.GetAndClearGotMouseEvent()); 787 EXPECT_FALSE(widget2.GetAndClearGotMouseEvent());
787 } 788 }
788 #endif 789 #endif
789 790
790 } // namespace test 791 } // namespace test
791 } // namespace views 792 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/native_widget_aura_unittest.cc ('k') | ui/views/widget/widget_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698