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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_window_tree_host_x11_unittest.cc

Issue 1602173005: Add PlatformWindow/Event related code for Ozone X11. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Final fixes for comments + tests. Created 4 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 unified diff | Download patch
OLDNEW
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 <vector> 5 #include <vector>
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <X11/extensions/shape.h> 8 #include <X11/extensions/shape.h>
9 #include <X11/Xlib.h> 9 #include <X11/Xlib.h>
10 10
11 // Get rid of X11 macros which conflict with gtest. 11 // Get rid of X11 macros which conflict with gtest.
12 // It is necessary to include this header before the rest so that Bool can be 12 // It is necessary to include this header before the rest so that Bool can be
13 // undefined. 13 // undefined.
14 #include "ui/events/test/events_test_utils_x11.h" 14 #include "ui/events/test/events_test_utils_x11.h"
15 #undef Bool 15 #undef Bool
16 #undef None 16 #undef None
17 17
18 #include "base/command_line.h" 18 #include "base/command_line.h"
19 #include "base/macros.h" 19 #include "base/macros.h"
20 #include "base/memory/scoped_ptr.h" 20 #include "base/memory/scoped_ptr.h"
21 #include "base/run_loop.h" 21 #include "base/run_loop.h"
22 #include "ui/aura/window.h" 22 #include "ui/aura/window.h"
23 #include "ui/aura/window_tree_host.h" 23 #include "ui/aura/window_tree_host.h"
24 #include "ui/base/hit_test.h" 24 #include "ui/base/hit_test.h"
25 #include "ui/base/x/x11_util.h" 25 #include "ui/base/x/x11_util.h"
26 #include "ui/events/devices/x11/touch_factory_x11.h" 26 #include "ui/events/devices/x11/touch_factory_x11.h"
27 #include "ui/events/platform/x11/x11_event_source.h" 27 #include "ui/events/platform/x11/x11_event_source_glib.h"
28 #include "ui/events/test/platform_event_source_test_api.h" 28 #include "ui/events/test/platform_event_source_test_api.h"
29 #include "ui/gfx/geometry/point.h" 29 #include "ui/gfx/geometry/point.h"
30 #include "ui/gfx/geometry/rect.h" 30 #include "ui/gfx/geometry/rect.h"
31 #include "ui/gfx/path.h" 31 #include "ui/gfx/path.h"
32 #include "ui/gfx/switches.h" 32 #include "ui/gfx/switches.h"
33 #include "ui/gfx/x/x11_atom_cache.h" 33 #include "ui/gfx/x/x11_atom_cache.h"
34 #include "ui/views/test/views_test_base.h" 34 #include "ui/views/test/views_test_base.h"
35 #include "ui/views/test/x11_property_change_waiter.h" 35 #include "ui/views/test/x11_property_change_waiter.h"
36 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" 36 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
37 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h" 37 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h"
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 EXPECT_EQ(ui::ET_MOUSEWHEEL, second_recorder.mouse_events()[0].type()); 644 EXPECT_EQ(ui::ET_MOUSEWHEEL, second_recorder.mouse_events()[0].type());
645 EXPECT_EQ(gfx::Point(-25, -25).ToString(), 645 EXPECT_EQ(gfx::Point(-25, -25).ToString(),
646 second_recorder.mouse_events()[0].location().ToString()); 646 second_recorder.mouse_events()[0].location().ToString());
647 647
648 PretendCapture(nullptr); 648 PretendCapture(nullptr);
649 first.GetNativeWindow()->RemovePreTargetHandler(&first_recorder); 649 first.GetNativeWindow()->RemovePreTargetHandler(&first_recorder);
650 second.GetNativeWindow()->RemovePreTargetHandler(&second_recorder); 650 second.GetNativeWindow()->RemovePreTargetHandler(&second_recorder);
651 } 651 }
652 652
653 } // namespace views 653 } // namespace views
OLDNEW
« no previous file with comments | « ui/platform_window/x11/x11_window_ozone.cc ('k') | ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698