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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura_unittest.cc

Issue 613373004: Adopt ui::GestureConfiguration on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 (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 "content/browser/renderer_host/render_widget_host_view_aura.h" 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/memory/shared_memory.h" 9 #include "base/memory/shared_memory.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 #include "ui/aura/test/test_screen.h" 46 #include "ui/aura/test/test_screen.h"
47 #include "ui/aura/test/test_window_delegate.h" 47 #include "ui/aura/test/test_window_delegate.h"
48 #include "ui/aura/window.h" 48 #include "ui/aura/window.h"
49 #include "ui/aura/window_event_dispatcher.h" 49 #include "ui/aura/window_event_dispatcher.h"
50 #include "ui/aura/window_observer.h" 50 #include "ui/aura/window_observer.h"
51 #include "ui/base/ui_base_types.h" 51 #include "ui/base/ui_base_types.h"
52 #include "ui/compositor/compositor.h" 52 #include "ui/compositor/compositor.h"
53 #include "ui/compositor/test/draw_waiter_for_test.h" 53 #include "ui/compositor/test/draw_waiter_for_test.h"
54 #include "ui/events/event.h" 54 #include "ui/events/event.h"
55 #include "ui/events/event_utils.h" 55 #include "ui/events/event_utils.h"
56 #include "ui/events/gestures/gesture_configuration.h" 56 #include "ui/events/gesture_detection/gesture_configuration.h"
57 #include "ui/events/test/event_generator.h" 57 #include "ui/events/test/event_generator.h"
58 #include "ui/wm/core/default_activation_client.h" 58 #include "ui/wm/core/default_activation_client.h"
59 59
60 using testing::_; 60 using testing::_;
61 61
62 using blink::WebGestureEvent; 62 using blink::WebGestureEvent;
63 using blink::WebInputEvent; 63 using blink::WebInputEvent;
64 using blink::WebMouseEvent; 64 using blink::WebMouseEvent;
65 using blink::WebMouseWheelEvent; 65 using blink::WebMouseWheelEvent;
66 using blink::WebTouchEvent; 66 using blink::WebTouchEvent;
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 virtual void SetUp() {} 463 virtual void SetUp() {}
464 464
465 protected: 465 protected:
466 void SetUpOverscrollEnvironmentWithDebounce(int debounce_interval_in_ms) { 466 void SetUpOverscrollEnvironmentWithDebounce(int debounce_interval_in_ms) {
467 SetUpOverscrollEnvironmentImpl(debounce_interval_in_ms); 467 SetUpOverscrollEnvironmentImpl(debounce_interval_in_ms);
468 } 468 }
469 469
470 void SetUpOverscrollEnvironment() { SetUpOverscrollEnvironmentImpl(0); } 470 void SetUpOverscrollEnvironment() { SetUpOverscrollEnvironmentImpl(0); }
471 471
472 void SetUpOverscrollEnvironmentImpl(int debounce_interval_in_ms) { 472 void SetUpOverscrollEnvironmentImpl(int debounce_interval_in_ms) {
473 ui::GestureConfiguration::set_scroll_debounce_interval_in_ms( 473 ui::GestureConfiguration::GetInstance()->set_scroll_debounce_interval_in_ms(
474 debounce_interval_in_ms); 474 debounce_interval_in_ms);
475 475
476 RenderWidgetHostViewAuraTest::SetUp(); 476 RenderWidgetHostViewAuraTest::SetUp();
477 477
478 view_->SetOverscrollControllerEnabled(true); 478 view_->SetOverscrollControllerEnabled(true);
479 overscroll_delegate_.reset(new TestOverscrollDelegate(view_)); 479 overscroll_delegate_.reset(new TestOverscrollDelegate(view_));
480 view_->overscroll_controller()->set_delegate(overscroll_delegate_.get()); 480 view_->overscroll_controller()->set_delegate(overscroll_delegate_.get());
481 481
482 view_->InitAsChild(NULL); 482 view_->InitAsChild(NULL);
483 view_->SetBounds(gfx::Rect(0, 0, 400, 200)); 483 view_->SetBounds(gfx::Rect(0, 0, 400, 200));
(...skipping 2423 matching lines...) Expand 10 before | Expand all | Expand 10 after
2907 } 2907 }
2908 2908
2909 // Tests that when view initiated shutdown happens (i.e. RWHView is deleted 2909 // Tests that when view initiated shutdown happens (i.e. RWHView is deleted
2910 // before RWH), we clean up properly and don't leak the RWHVGuest. 2910 // before RWH), we clean up properly and don't leak the RWHVGuest.
2911 TEST_F(RenderWidgetHostViewGuestAuraTest, GuestViewDoesNotLeak) { 2911 TEST_F(RenderWidgetHostViewGuestAuraTest, GuestViewDoesNotLeak) {
2912 TearDownEnvironment(); 2912 TearDownEnvironment();
2913 ASSERT_FALSE(guest_view_weak_.get()); 2913 ASSERT_FALSE(guest_view_weak_.get());
2914 } 2914 }
2915 2915
2916 } // namespace content 2916 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698