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

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

Issue 224903022: Linux: App windows with frame: none now have resize handles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/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
diff --git a/chrome/browser/ui/views/apps/shaped_app_window_targeter_unittest.cc b/chrome/browser/ui/views/apps/shaped_app_window_targeter_unittest.cc
index 3d8879db2991d78f3fe03e423e8004debb1a0b32..975a2e9fcc997c1795218cc7e6afc8b0571ebadb 100644
--- a/chrome/browser/ui/views/apps/shaped_app_window_targeter_unittest.cc
+++ b/chrome/browser/ui/views/apps/shaped_app_window_targeter_unittest.cc
@@ -188,6 +188,11 @@ TEST_F(ShapedAppWindowTargeterTest, ResizeInsetsWithinBounds) {
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.
ui::MouseEvent move(ui::ET_MOUSE_MOVED,
@@ -201,13 +206,17 @@ TEST_F(ShapedAppWindowTargeterTest, ResizeInsetsWithinBounds) {
{
// 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.
+ // TODO(mgiuca): This basically tests nothing now. The target is |window|
+ // either way. This expectation will pass even if the
+ // EasyResizeWindowTargeter is not installed (but the earlier expectation
+ // will fail).
Matt Giuca 2014/04/08 09:24:32 Please see my comment #17 and #18 on http://crbug.
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