Chromium Code Reviews| 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()); |
| } |
| } |