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

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

Issue 2455963006: Wires up drag/drop for aura-mus (Closed)
Patch Set: twweaks Created 4 years, 1 month 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 <map> 5 #include <map>
6 #include <memory> 6 #include <memory>
7 #include <vector> 7 #include <vector>
8 8
9 // Include views_test_base.h first because the definition of None in X.h 9 // Include views_test_base.h first because the definition of None in X.h
10 // conflicts with the definition of None in gtest-type-util.h 10 // conflicts with the definition of None in gtest-type-util.h
11 #include "ui/views/test/views_test_base.h" 11 #include "ui/views/test/views_test_base.h"
12 12
13 #include "base/location.h" 13 #include "base/location.h"
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "base/memory/ptr_util.h" 15 #include "base/memory/ptr_util.h"
16 #include "base/run_loop.h" 16 #include "base/run_loop.h"
17 #include "base/single_thread_task_runner.h" 17 #include "base/single_thread_task_runner.h"
18 #include "base/strings/utf_string_conversions.h" 18 #include "base/strings/utf_string_conversions.h"
19 #include "base/threading/thread_task_runner_handle.h" 19 #include "base/threading/thread_task_runner_handle.h"
20 #include "ui/aura/client/drag_drop_delegate.h"
20 #include "ui/aura/test/test_screen.h" 21 #include "ui/aura/test/test_screen.h"
21 #include "ui/aura/window.h" 22 #include "ui/aura/window.h"
22 #include "ui/aura/window_tree_host.h" 23 #include "ui/aura/window_tree_host.h"
23 #include "ui/base/dragdrop/os_exchange_data.h" 24 #include "ui/base/dragdrop/os_exchange_data.h"
24 #include "ui/base/x/x11_util.h" 25 #include "ui/base/x/x11_util.h"
25 #include "ui/events/event_utils.h" 26 #include "ui/events/event_utils.h"
26 #include "ui/gfx/x/x11_atom_cache.h" 27 #include "ui/gfx/x/x11_atom_cache.h"
27 #include "ui/gfx/x/x11_types.h" 28 #include "ui/gfx/x/x11_types.h"
28 #include "ui/views/widget/desktop_aura/desktop_cursor_loader_updater.h" 29 #include "ui/views/widget/desktop_aura/desktop_cursor_loader_updater.h"
29 #include "ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.h" 30 #include "ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.h"
30 #include "ui/views/widget/desktop_aura/desktop_native_cursor_manager.h" 31 #include "ui/views/widget/desktop_aura/desktop_native_cursor_manager.h"
31 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" 32 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
32 #include "ui/views/widget/desktop_aura/x11_move_loop.h" 33 #include "ui/views/widget/desktop_aura/x11_move_loop.h"
33 #include "ui/views/widget/widget.h" 34 #include "ui/views/widget/widget.h"
34 #include "ui/wm/public/drag_drop_delegate.h"
35 35
36 #include <X11/Xlib.h> 36 #include <X11/Xlib.h>
37 37
38 namespace views { 38 namespace views {
39 39
40 namespace { 40 namespace {
41 41
42 const char* kAtomsToCache[] = { 42 const char* kAtomsToCache[] = {
43 "XdndActionCopy", 43 "XdndActionCopy",
44 "XdndDrop", 44 "XdndDrop",
(...skipping 957 matching lines...) Expand 10 before | Expand all | Expand 10 after
1002 // the aura::client::DragDropDelegate is properly notified. 1002 // the aura::client::DragDropDelegate is properly notified.
1003 TEST_F(DesktopDragDropClientAuraX11ChromeSourceTargetTest, CtrlPressed) { 1003 TEST_F(DesktopDragDropClientAuraX11ChromeSourceTargetTest, CtrlPressed) {
1004 base::ThreadTaskRunnerHandle::Get()->PostTask( 1004 base::ThreadTaskRunnerHandle::Get()->PostTask(
1005 FROM_HERE, 1005 FROM_HERE,
1006 base::Bind(&ChromeSourceTargetStep2, client(), ui::EF_CONTROL_DOWN)); 1006 base::Bind(&ChromeSourceTargetStep2, client(), ui::EF_CONTROL_DOWN));
1007 int result = StartDragAndDrop(); 1007 int result = StartDragAndDrop();
1008 EXPECT_EQ(ui::DragDropTypes::DRAG_COPY, result); 1008 EXPECT_EQ(ui::DragDropTypes::DRAG_COPY, result);
1009 } 1009 }
1010 1010
1011 } // namespace views 1011 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698