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

Side by Side Diff: ash/drag_drop/drag_drop_controller_unittest.cc

Issue 67923002: Fixes for -Wunused-function on Linux, Android and ChromeOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase for realz Created 7 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 | Annotate | Revision Log
« no previous file with comments | « ash/display/mouse_cursor_event_filter_unittest.cc ('k') | ash/extended_desktop_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ash/drag_drop/drag_drop_controller.h" 5 #include "ash/drag_drop/drag_drop_controller.h"
6 6
7 #include "ash/drag_drop/drag_drop_tracker.h" 7 #include "ash/drag_drop/drag_drop_tracker.h"
8 #include "ash/drag_drop/drag_image_view.h" 8 #include "ash/drag_drop/drag_image_view.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/test/ash_test_base.h" 10 #include "ash/test/ash_test_base.h"
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 location.x(), 280 location.x(),
281 location.y(), 281 location.y(),
282 0, 282 0,
283 ui::EventTimeForNow(), 283 ui::EventTimeForNow(),
284 ui::GestureEventDetails(gesture_type, 0, 0), 284 ui::GestureEventDetails(gesture_type, 0, 0),
285 1); 285 1);
286 Shell::GetPrimaryRootWindow()->GetDispatcher()->DispatchGestureEvent( 286 Shell::GetPrimaryRootWindow()->GetDispatcher()->DispatchGestureEvent(
287 &gesture_event); 287 &gesture_event);
288 } 288 }
289 289
290 bool IsGestureEventType(ui::EventType type) {
291 switch (type) {
292 case ui::ET_GESTURE_SCROLL_BEGIN:
293 case ui::ET_GESTURE_SCROLL_END:
294 case ui::ET_GESTURE_SCROLL_UPDATE:
295 case ui::ET_GESTURE_TAP:
296 case ui::ET_GESTURE_TAP_CANCEL:
297 case ui::ET_GESTURE_TAP_DOWN:
298 case ui::ET_GESTURE_BEGIN:
299 case ui::ET_GESTURE_END:
300 case ui::ET_GESTURE_TWO_FINGER_TAP:
301 case ui::ET_GESTURE_PINCH_BEGIN:
302 case ui::ET_GESTURE_PINCH_END:
303 case ui::ET_GESTURE_PINCH_UPDATE:
304 case ui::ET_GESTURE_LONG_PRESS:
305 case ui::ET_GESTURE_LONG_TAP:
306 case ui::ET_GESTURE_MULTIFINGER_SWIPE:
307 case ui::ET_SCROLL_FLING_CANCEL:
308 case ui::ET_SCROLL_FLING_START:
309 return true;
310 default:
311 break;
312 }
313 return false;
314 }
315
316 } // namespace 290 } // namespace
317 291
318 class DragDropControllerTest : public AshTestBase { 292 class DragDropControllerTest : public AshTestBase {
319 public: 293 public:
320 DragDropControllerTest() : AshTestBase() {} 294 DragDropControllerTest() : AshTestBase() {}
321 virtual ~DragDropControllerTest() {} 295 virtual ~DragDropControllerTest() {}
322 296
323 virtual void SetUp() OVERRIDE { 297 virtual void SetUp() OVERRIDE {
324 AshTestBase::SetUp(); 298 AshTestBase::SetUp();
325 drag_drop_controller_.reset(new TestDragDropController); 299 drag_drop_controller_.reset(new TestDragDropController);
(...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after
1100 EXPECT_EQ("405,405", observer.window_location_on_destroying().ToString()); 1074 EXPECT_EQ("405,405", observer.window_location_on_destroying().ToString());
1101 } 1075 }
1102 for (aura::Window::Windows::iterator iter = root_windows.begin(); 1076 for (aura::Window::Windows::iterator iter = root_windows.begin();
1103 iter != root_windows.end(); ++iter) { 1077 iter != root_windows.end(); ++iter) {
1104 aura::client::SetDragDropClient(*iter, NULL); 1078 aura::client::SetDragDropClient(*iter, NULL);
1105 } 1079 }
1106 } 1080 }
1107 1081
1108 } // namespace test 1082 } // namespace test
1109 } // namespace aura 1083 } // namespace aura
OLDNEW
« no previous file with comments | « ash/display/mouse_cursor_event_filter_unittest.cc ('k') | ash/extended_desktop_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698