Index: ash/wm/workspace_controller_unittest.cc |
diff --git a/ash/wm/workspace_controller_unittest.cc b/ash/wm/workspace_controller_unittest.cc |
index db4d5869762dff7e0340d9525b72602b0361871e..d13dd989c24fa5d20de2ab1302d8d2795cddbfcf 100644 |
--- a/ash/wm/workspace_controller_unittest.cc |
+++ b/ash/wm/workspace_controller_unittest.cc |
@@ -1360,13 +1360,8 @@ class DragMaximizedNonTrackedWindowObserver : public aura::WindowObserver { |
// Counts number of times a window is reparented. Ignores reparenting into and |
// from a docked container which is expected when a tab is dragged. |
void OnWindowHierarchyChanged(const HierarchyChangeParams& params) override { |
- if (params.target != window_ || |
- (params.old_parent->id() == kShellWindowId_DefaultContainer && |
- params.new_parent->id() == kShellWindowId_DockedContainer) || |
- (params.old_parent->id() == kShellWindowId_DockedContainer && |
- params.new_parent->id() == kShellWindowId_DefaultContainer)) { |
+ if (params.target != window_) |
return; |
- } |
change_count_++; |
oshima
2017/02/22 06:49:07
looks like this isn't used?
afakhry
2017/02/22 22:04:43
Done.
|
} |
@@ -1594,53 +1589,4 @@ TEST_F(WorkspaceControllerTest, WindowEdgeTouchHitTestPanel) { |
} |
} |
-// Verifies events targeting just outside the window edges for docked windows. |
-TEST_F(WorkspaceControllerTest, WindowEdgeHitTestDocked) { |
- aura::test::TestWindowDelegate delegate; |
- // Make window smaller than the minimum docked area so that the window edges |
- // are exposed. |
- delegate.set_maximum_size(gfx::Size(180, 200)); |
- std::unique_ptr<Window> window(aura::test::CreateTestWindowWithDelegate( |
- &delegate, 123, gfx::Rect(20, 10, 100, 50), NULL)); |
- ParentWindowInPrimaryRootWindow(window.get()); |
- aura::Window* docked_container = Shell::GetContainer( |
- window->GetRootWindow(), kShellWindowId_DockedContainer); |
- docked_container->AddChild(window.get()); |
- window->Show(); |
- ui::EventTarget* root = window->GetRootWindow(); |
- ui::EventTargeter* targeter = root->GetEventTargeter(); |
- const gfx::Rect bounds = window->bounds(); |
- const int kNumPoints = 5; |
- struct { |
- const char* direction; |
- gfx::Point location; |
- bool is_target_hit; |
- } points[kNumPoints] = { |
- {"left", gfx::Point(bounds.x() - 2, bounds.y() + 10), true}, |
- {"top", gfx::Point(bounds.x() + 10, bounds.y() - 2), true}, |
- {"right", gfx::Point(bounds.right() + 2, bounds.y() + 10), true}, |
- {"bottom", gfx::Point(bounds.x() + 10, bounds.bottom() + 2), true}, |
- {"outside", gfx::Point(bounds.x() + 10, bounds.y() - 31), false}, |
- }; |
- for (int i = 0; i < kNumPoints; ++i) { |
- SCOPED_TRACE(points[i].direction); |
- const gfx::Point& location = points[i].location; |
- ui::MouseEvent mouse(ui::ET_MOUSE_MOVED, location, location, |
- ui::EventTimeForNow(), ui::EF_NONE, ui::EF_NONE); |
- ui::EventTarget* target = targeter->FindTargetForEvent(root, &mouse); |
- if (points[i].is_target_hit) |
- EXPECT_EQ(window.get(), target); |
- else |
- EXPECT_NE(window.get(), target); |
- |
- ui::TouchEvent touch(ui::ET_TOUCH_PRESSED, location, 0, |
- ui::EventTimeForNow()); |
- target = targeter->FindTargetForEvent(root, &touch); |
- if (points[i].is_target_hit) |
- EXPECT_EQ(window.get(), target); |
- else |
- EXPECT_NE(window.get(), target); |
- } |
-} |
- |
} // namespace ash |