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

Unified Diff: ui/aura/window_unittest.cc

Issue 178493003: aura: Make Window::HitTest() a private method. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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
« ash/wm/app_list_controller.cc ('K') | « ui/aura/window.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/window_unittest.cc
diff --git a/ui/aura/window_unittest.cc b/ui/aura/window_unittest.cc
index 119b1698264102842a5e24ef2b0c5e7e9290e108..5a204d6d3a322672c5f295a001036d5144cdea6f 100644
--- a/ui/aura/window_unittest.cc
+++ b/ui/aura/window_unittest.cc
@@ -470,42 +470,6 @@ TEST_F(WindowTest, MoveCursorToWithComplexTransform) {
gfx::Screen::GetScreenFor(root)->GetCursorScreenPoint().ToString());
}
-TEST_F(WindowTest, HitTest) {
- Window w1(new ColorTestWindowDelegate(SK_ColorWHITE));
- w1.set_id(1);
- w1.Init(aura::WINDOW_LAYER_TEXTURED);
- w1.SetBounds(gfx::Rect(10, 20, 50, 60));
- w1.Show();
- ParentWindow(&w1);
-
- // Points are in the Window's coordinates.
- EXPECT_TRUE(w1.HitTest(gfx::Point(1, 1)));
- EXPECT_FALSE(w1.HitTest(gfx::Point(-1, -1)));
-
- // TODO(beng): clip Window to parent.
-}
-
-TEST_F(WindowTest, HitTestMask) {
- MaskedWindowDelegate d1(gfx::Rect(5, 6, 20, 30));
- Window w1(&d1);
- w1.Init(aura::WINDOW_LAYER_NOT_DRAWN);
- w1.SetBounds(gfx::Rect(10, 20, 50, 60));
- w1.Show();
- ParentWindow(&w1);
-
- // Points inside the mask.
- EXPECT_TRUE(w1.HitTest(gfx::Point(5, 6))); // top-left
- EXPECT_TRUE(w1.HitTest(gfx::Point(15, 21))); // center
- EXPECT_TRUE(w1.HitTest(gfx::Point(24, 35))); // bottom-right
-
- // Points outside the mask.
- EXPECT_FALSE(w1.HitTest(gfx::Point(0, 0)));
- EXPECT_FALSE(w1.HitTest(gfx::Point(60, 80)));
- EXPECT_FALSE(w1.HitTest(gfx::Point(4, 6)));
- EXPECT_FALSE(w1.HitTest(gfx::Point(5, 5)));
- EXPECT_FALSE(w1.HitTest(gfx::Point(25, 36)));
-}
-
TEST_F(WindowTest, GetEventHandlerForPoint) {
scoped_ptr<Window> w1(
CreateTestWindow(SK_ColorWHITE, 1, gfx::Rect(10, 10, 500, 500),
« ash/wm/app_list_controller.cc ('K') | « ui/aura/window.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698