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

Side by Side Diff: content/browser/renderer_host/render_widget_host_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) 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 "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/memory/shared_memory.h" 7 #include "base/memory/shared_memory.h"
8 #include "base/timer/timer.h" 8 #include "base/timer/timer.h"
9 #include "content/browser/browser_thread_impl.h" 9 #include "content/browser/browser_thread_impl.h"
10 #include "content/browser/renderer_host/backing_store.h" 10 #include "content/browser/renderer_host/backing_store.h"
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 }; 218 };
219 219
220 // MockRenderWidgetHost ---------------------------------------------------- 220 // MockRenderWidgetHost ----------------------------------------------------
221 221
222 class MockRenderWidgetHost : public RenderWidgetHostImpl { 222 class MockRenderWidgetHost : public RenderWidgetHostImpl {
223 public: 223 public:
224 MockRenderWidgetHost( 224 MockRenderWidgetHost(
225 RenderWidgetHostDelegate* delegate, 225 RenderWidgetHostDelegate* delegate,
226 RenderProcessHost* process, 226 RenderProcessHost* process,
227 int routing_id) 227 int routing_id)
228 : RenderWidgetHostImpl(delegate, process, routing_id), 228 : RenderWidgetHostImpl(delegate, process, routing_id, false),
229 unresponsive_timer_fired_(false) { 229 unresponsive_timer_fired_(false) {
230 immediate_input_router_ = 230 immediate_input_router_ =
231 static_cast<ImmediateInputRouter*>(input_router_.get()); 231 static_cast<ImmediateInputRouter*>(input_router_.get());
232 } 232 }
233 233
234 // Allow poking at a few private members. 234 // Allow poking at a few private members.
235 using RenderWidgetHostImpl::OnPaintAtSizeAck; 235 using RenderWidgetHostImpl::OnPaintAtSizeAck;
236 using RenderWidgetHostImpl::OnUpdateRect; 236 using RenderWidgetHostImpl::OnUpdateRect;
237 using RenderWidgetHostImpl::RendererExited; 237 using RenderWidgetHostImpl::RendererExited;
238 using RenderWidgetHostImpl::last_requested_size_; 238 using RenderWidgetHostImpl::last_requested_size_;
(...skipping 2329 matching lines...) Expand 10 before | Expand all | Expand 10 after
2568 2568
2569 TEST_F(RenderWidgetHostTest, InputRouterReceivesHasTouchEventHandlers) { 2569 TEST_F(RenderWidgetHostTest, InputRouterReceivesHasTouchEventHandlers) {
2570 host_->SetupForInputRouterTest(); 2570 host_->SetupForInputRouterTest();
2571 2571
2572 host_->OnMessageReceived(ViewHostMsg_HasTouchEventHandlers(0, true)); 2572 host_->OnMessageReceived(ViewHostMsg_HasTouchEventHandlers(0, true));
2573 2573
2574 EXPECT_TRUE(host_->mock_input_router()->message_received_); 2574 EXPECT_TRUE(host_->mock_input_router()->message_received_);
2575 } 2575 }
2576 2576
2577 } // namespace content 2577 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698