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

Unified Diff: ui/views/widget/desktop_aura/desktop_screen_x11_unittest.cc

Issue 137533006: Call XSetInputFocus after XRaiseWindow when activating. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 11 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
Index: ui/views/widget/desktop_aura/desktop_screen_x11_unittest.cc
diff --git a/ui/views/widget/desktop_aura/desktop_screen_x11_unittest.cc b/ui/views/widget/desktop_aura/desktop_screen_x11_unittest.cc
index c8efae8205be0af6997464f0837e0016d979dfa2..49d0329978bcd65a25d51a268877f123fe6735dd 100644
--- a/ui/views/widget/desktop_aura/desktop_screen_x11_unittest.cc
+++ b/ui/views/widget/desktop_aura/desktop_screen_x11_unittest.cc
@@ -199,29 +199,35 @@ TEST_F(DesktopScreenX11Test, GetPrimaryDisplay) {
}
TEST_F(DesktopScreenX11Test, GetWindowAtScreenPoint) {
- Widget* window_one = BuildTopLevelDesktopWidget(gfx::Rect(10, 10, 10, 10));
- Widget* window_two = BuildTopLevelDesktopWidget(gfx::Rect(50, 50, 10, 10));
- Widget* window_three = BuildTopLevelDesktopWidget(gfx::Rect(15, 15, 20, 20));
+ Widget* window_one = BuildTopLevelDesktopWidget(gfx::Rect(110, 110, 10, 10));
+ Widget* window_two = BuildTopLevelDesktopWidget(gfx::Rect(150, 150, 10, 10));
+ Widget* window_three =
+ BuildTopLevelDesktopWidget(gfx::Rect(115, 115, 20, 20));
+
+ window_three->Show();
+ window_two->Show();
+ window_one->Show();
// Make sure the internal state of DesktopWindowTreeHostX11 is set up
// correctly.
ASSERT_EQ(3u, DesktopWindowTreeHostX11::GetAllOpenWindows().size());
EXPECT_EQ(window_one->GetNativeWindow(),
- screen()->GetWindowAtScreenPoint(gfx::Point(15, 15)));
+ screen()->GetWindowAtScreenPoint(gfx::Point(115, 115)));
EXPECT_EQ(window_two->GetNativeWindow(),
- screen()->GetWindowAtScreenPoint(gfx::Point(55, 55)));
+ screen()->GetWindowAtScreenPoint(gfx::Point(155, 155)));
EXPECT_EQ(NULL,
- screen()->GetWindowAtScreenPoint(gfx::Point(100, 100)));
+ screen()->GetWindowAtScreenPoint(gfx::Point(200, 200)));
// Bring the third window in front. It overlaps with the first window.
// Hit-testing on the intersecting region should give the third window.
window_three->Activate();
EXPECT_EQ(window_three->GetNativeWindow(),
- screen()->GetWindowAtScreenPoint(gfx::Point(15, 15)));
+ screen()->GetWindowAtScreenPoint(gfx::Point(115, 115)));
window_one->CloseNow();
window_two->CloseNow();
+ window_three->CloseNow();
}
TEST_F(DesktopScreenX11Test, GetDisplayNearestWindow) {
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc ('k') | ui/views/widget/desktop_aura/x11_desktop_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698