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 05c6ae439de748aeed5eeec2db4bc975cb06fce8..0da22577bfd783ca7eb69da2ac81479658add0f7 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 |
@@ -94,6 +94,28 @@ TEST_F(ShapedAppWindowTargeterTest, HitTestBasic) { |
ASSERT_FALSE(details.dispatcher_destroyed); |
EXPECT_EQ(window, move2.target()); |
} |
+ |
+ region.reset(new SkRegion); |
+ region->op(SkIRect::MakeXYWH(0, 0, 0, 0), SkRegion::kUnion_Op); |
+ app_window()->UpdateShape(region.Pass()); |
+ { |
+ // With an empty custom shape, all events within the window should fall |
+ // through to the root window. |
+ ui::MouseEvent move(ui::ET_MOUSE_MOVED, |
tapted
2014/09/29 01:16:20
This is super-nitty, but I kinda feel this would b
garykac
2014/09/29 23:50:59
Moved.
|
+ gfx::Point(40, 40), gfx::Point(40, 40), |
+ ui::EF_NONE, ui::EF_NONE); |
+ ui::EventDispatchDetails details = |
+ event_processor()->OnEventFromSource(&move); |
+ ASSERT_FALSE(details.dispatcher_destroyed); |
+ EXPECT_EQ(root_window(), move.target()); |
+ |
+ ui::MouseEvent move2(ui::ET_MOUSE_MOVED, |
+ gfx::Point(80, 80), gfx::Point(80, 80), |
+ ui::EF_NONE, ui::EF_NONE); |
+ details = event_processor()->OnEventFromSource(&move2); |
+ ASSERT_FALSE(details.dispatcher_destroyed); |
+ EXPECT_EQ(root_window(), move2.target()); |
+ } |
} |
TEST_F(ShapedAppWindowTargeterTest, HitTestOnlyForShapedWindow) { |