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

Unified Diff: chrome/browser/ui/views/apps/shaped_app_window_targeter_unittest.cc

Issue 239183007: Merge 262965 "Linux: App windows with frame: none now have resiz..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1916/src/
Patch Set: Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/apps/chrome_native_app_window_views.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/apps/shaped_app_window_targeter_unittest.cc
===================================================================
--- chrome/browser/ui/views/apps/shaped_app_window_targeter_unittest.cc (revision 264053)
+++ chrome/browser/ui/views/apps/shaped_app_window_targeter_unittest.cc (working copy)
@@ -188,8 +188,21 @@
app_window_views()->InstallEasyResizeTargeterOnContainer();
{
+ // Ensure that the window has an event targeter (there should be an
+ // EasyResizeWindowTargeter installed).
+ EXPECT_TRUE(static_cast<ui::EventTarget*>(window)->GetEventTargeter());
+ }
+ {
// An event in the center of the window should always have
// |window| as its target.
+ // TODO(mgiuca): This isn't really testing anything (note that it has the
+ // same expectation as the border case below). In the real environment, the
+ // target will actually be the RenderWidgetHostViewAura's window that is the
+ // child of the child of |window|, whereas in the border case it *will* be
+ // |window|. However, since this test environment does not have a
+ // RenderWidgetHostViewAura, we cannot differentiate the two cases. Fix
+ // the test environment so that the test can assert that non-border events
+ // bubble down to a child of |window|.
ui::MouseEvent move(ui::ET_MOUSE_MOVED,
gfx::Point(80, 80), gfx::Point(80, 80),
ui::EF_NONE, ui::EF_NONE);
@@ -201,13 +214,13 @@
{
// With an EasyResizeTargeter on the container, an event
// inside the window and within 5px of an edge should have
- // root_window() as its target.
+ // |window| as its target.
ui::MouseEvent move(ui::ET_MOUSE_MOVED,
gfx::Point(32, 37), gfx::Point(32, 37),
ui::EF_NONE, ui::EF_NONE);
ui::EventDispatchDetails details =
event_processor()->OnEventFromSource(&move);
ASSERT_FALSE(details.dispatcher_destroyed);
- EXPECT_EQ(root_window(), move.target());
+ EXPECT_EQ(window, move.target());
}
}
« no previous file with comments | « chrome/browser/ui/views/apps/chrome_native_app_window_views.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698