OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/views/widget/desktop_aura/x11_topmost_window_finder.h" | 5 #include "ui/views/widget/desktop_aura/x11_topmost_window_finder.h" |
6 | 6 |
7 #include <X11/Xlib.h> | 7 #include <X11/Xlib.h> |
8 #include <X11/Xregion.h> | 8 #include <X11/Xregion.h> |
9 #include <X11/extensions/shape.h> | 9 #include <X11/extensions/shape.h> |
10 #include <stddef.h> | 10 #include <stddef.h> |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 int screen_y, | 187 int screen_y, |
188 aura::Window* ignore_window) { | 188 aura::Window* ignore_window) { |
189 std::set<aura::Window*> ignore; | 189 std::set<aura::Window*> ignore; |
190 ignore.insert(ignore_window); | 190 ignore.insert(ignore_window); |
191 X11TopmostWindowFinder finder; | 191 X11TopmostWindowFinder finder; |
192 return finder.FindLocalProcessWindowAt(gfx::Point(screen_x, screen_y), | 192 return finder.FindLocalProcessWindowAt(gfx::Point(screen_x, screen_y), |
193 ignore); | 193 ignore); |
194 } | 194 } |
195 | 195 |
196 static void SetUpTestCase() { | 196 static void SetUpTestCase() { |
197 gfx::GLSurfaceTestSupport::InitializeOneOff(); | 197 gl::GLSurfaceTestSupport::InitializeOneOff(); |
198 ui::RegisterPathProvider(); | 198 ui::RegisterPathProvider(); |
199 base::FilePath ui_test_pak_path; | 199 base::FilePath ui_test_pak_path; |
200 ASSERT_TRUE(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path)); | 200 ASSERT_TRUE(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path)); |
201 ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path); | 201 ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path); |
202 } | 202 } |
203 | 203 |
204 // ViewsTestBase: | 204 // ViewsTestBase: |
205 void SetUp() override { | 205 void SetUp() override { |
206 ViewsTestBase::SetUp(); | 206 ViewsTestBase::SetUp(); |
207 | 207 |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
433 | 433 |
434 EXPECT_EQ(xid, FindTopmostXWindowAt(110, 110)); | 434 EXPECT_EQ(xid, FindTopmostXWindowAt(110, 110)); |
435 EXPECT_EQ(menu_xid, FindTopmostXWindowAt(150, 120)); | 435 EXPECT_EQ(menu_xid, FindTopmostXWindowAt(150, 120)); |
436 EXPECT_EQ(menu_xid, FindTopmostXWindowAt(210, 120)); | 436 EXPECT_EQ(menu_xid, FindTopmostXWindowAt(210, 120)); |
437 | 437 |
438 XDestroyWindow(xdisplay(), xid); | 438 XDestroyWindow(xdisplay(), xid); |
439 XDestroyWindow(xdisplay(), menu_xid); | 439 XDestroyWindow(xdisplay(), menu_xid); |
440 } | 440 } |
441 | 441 |
442 } // namespace views | 442 } // namespace views |
OLD | NEW |