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

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

Issue 23129015: Initialize RenderWidget(Host)(View)s with correct visibility state (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "base/time/time.h" 7 #include "base/time/time.h"
8 #include "content/browser/renderer_host/render_widget_host_delegate.h" 8 #include "content/browser/renderer_host/render_widget_host_delegate.h"
9 #include "content/browser/renderer_host/smooth_scroll_gesture_controller.h" 9 #include "content/browser/renderer_host/smooth_scroll_gesture_controller.h"
10 #include "content/browser/renderer_host/test_render_view_host.h" 10 #include "content/browser/renderer_host/test_render_view_host.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 } 52 }
53 virtual ~MockRenderWidgetHostDelegate() {} 53 virtual ~MockRenderWidgetHostDelegate() {}
54 }; 54 };
55 55
56 class MockRenderWidgetHost : public RenderWidgetHostImpl { 56 class MockRenderWidgetHost : public RenderWidgetHostImpl {
57 public: 57 public:
58 MockRenderWidgetHost( 58 MockRenderWidgetHost(
59 RenderWidgetHostDelegate* delegate, 59 RenderWidgetHostDelegate* delegate,
60 RenderProcessHost* process, 60 RenderProcessHost* process,
61 int routing_id) 61 int routing_id)
62 : RenderWidgetHostImpl(delegate, process, routing_id) { 62 : RenderWidgetHostImpl(delegate, process, routing_id, false) {
63 } 63 }
64 virtual ~MockRenderWidgetHost() {} 64 virtual ~MockRenderWidgetHost() {}
65 }; 65 };
66 66
67 class TestView : public TestRenderWidgetHostView { 67 class TestView : public TestRenderWidgetHostView {
68 public: 68 public:
69 explicit TestView(RenderWidgetHostImpl* rwh) 69 explicit TestView(RenderWidgetHostImpl* rwh)
70 : TestRenderWidgetHostView(rwh), 70 : TestRenderWidgetHostView(rwh),
71 mock_gesture_(NULL) { 71 mock_gesture_(NULL) {
72 } 72 }
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 EXPECT_EQ(original_gesture, view_->mock_gesture_); 174 EXPECT_EQ(original_gesture, view_->mock_gesture_);
175 175
176 // Ensure the smooth scroll is ticked. 176 // Ensure the smooth scroll is ticked.
177 PostQuitMessageAndRun(); 177 PostQuitMessageAndRun();
178 EXPECT_LT(current_ticks, view_->mock_gesture_->called_); 178 EXPECT_LT(current_ticks, view_->mock_gesture_->called_);
179 } 179 }
180 180
181 } // namespace 181 } // namespace
182 182
183 } // namespace content 183 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698