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

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

Issue 2712963003: mustash: Use ui::chromeos::EventRewriter in mus (Closed)
Patch Set: Fix build issues. Created 3 years, 9 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
« no previous file with comments | « ui/views/widget/widget.cc ('k') | no next file » | 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 1587 matching lines...) Expand 10 before | Expand all | Expand 10 after
1598 widget2.SetCapture(widget2.GetRootView()); 1598 widget2.SetCapture(widget2.GetRootView());
1599 EXPECT_FALSE(widget1.HasCapture()); 1599 EXPECT_FALSE(widget1.HasCapture());
1600 EXPECT_TRUE(widget2.HasCapture()); 1600 EXPECT_TRUE(widget2.HasCapture());
1601 1601
1602 widget1.GetAndClearGotMouseEvent(); 1602 widget1.GetAndClearGotMouseEvent();
1603 widget2.GetAndClearGotMouseEvent(); 1603 widget2.GetAndClearGotMouseEvent();
1604 // Send a mouse event to the RootWindow associated with |widget1|. Even though 1604 // Send a mouse event to the RootWindow associated with |widget1|. Even though
1605 // |widget2| has capture, |widget1| should still get the event. 1605 // |widget2| has capture, |widget1| should still get the event.
1606 ui::MouseEvent mouse_event(ui::ET_MOUSE_EXITED, gfx::Point(), gfx::Point(), 1606 ui::MouseEvent mouse_event(ui::ET_MOUSE_EXITED, gfx::Point(), gfx::Point(),
1607 ui::EventTimeForNow(), ui::EF_NONE, ui::EF_NONE); 1607 ui::EventTimeForNow(), ui::EF_NONE, ui::EF_NONE);
1608 ui::EventDispatchDetails details = widget1.GetNativeWindow()-> 1608 ui::EventDispatchDetails details =
1609 GetHost()->event_processor()->OnEventFromSource(&mouse_event); 1609 widget1.GetNativeWindow()->GetHost()->event_sink()->OnEventFromSource(
1610 &mouse_event);
1610 ASSERT_FALSE(details.dispatcher_destroyed); 1611 ASSERT_FALSE(details.dispatcher_destroyed);
1611 EXPECT_TRUE(widget1.GetAndClearGotMouseEvent()); 1612 EXPECT_TRUE(widget1.GetAndClearGotMouseEvent());
1612 EXPECT_FALSE(widget2.GetAndClearGotMouseEvent()); 1613 EXPECT_FALSE(widget2.GetAndClearGotMouseEvent());
1613 } 1614 }
1614 #endif // defined(OS_WIN) 1615 #endif // defined(OS_WIN)
1615 1616
1616 class WidgetInputMethodInteractiveTest : public WidgetTestInteractive { 1617 class WidgetInputMethodInteractiveTest : public WidgetTestInteractive {
1617 public: 1618 public:
1618 WidgetInputMethodInteractiveTest() {} 1619 WidgetInputMethodInteractiveTest() {}
1619 1620
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
1806 1807
1807 ui::KeyEvent key_event2(key_event); 1808 ui::KeyEvent key_event2(key_event);
1808 widget->OnKeyEvent(&key_event2); 1809 widget->OnKeyEvent(&key_event2);
1809 EXPECT_FALSE(key_event2.stopped_propagation()); 1810 EXPECT_FALSE(key_event2.stopped_propagation());
1810 1811
1811 widget->CloseNow(); 1812 widget->CloseNow();
1812 } 1813 }
1813 1814
1814 } // namespace test 1815 } // namespace test
1815 } // namespace views 1816 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/widget.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698