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

Side by Side Diff: content/test/render_view_test.cc

Issue 10479023: Simplify how Content*Client interfaces are created. Instead of depending on the embedder to know wh… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: remove unused function declaration Created 8 years, 6 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 "content/public/test/render_view_test.h" 5 #include "content/public/test/render_view_test.h"
6 6
7 #include "content/common/view_messages.h" 7 #include "content/common/view_messages.h"
8 #include "content/public/browser/native_web_keyboard_event.h" 8 #include "content/public/browser/native_web_keyboard_event.h"
9 #include "content/public/common/renderer_preferences.h" 9 #include "content/public/common/renderer_preferences.h"
10 #include "content/renderer/render_thread_impl.h" 10 #include "content/renderer/render_thread_impl.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 } 117 }
118 118
119 void RenderViewTest::GoForward(const WebKit::WebHistoryItem& item) { 119 void RenderViewTest::GoForward(const WebKit::WebHistoryItem& item) {
120 GoToOffset(1, item); 120 GoToOffset(1, item);
121 } 121 }
122 122
123 void RenderViewTest::SetUp() { 123 void RenderViewTest::SetUp() {
124 // Subclasses can set the ContentClient's renderer before calling 124 // Subclasses can set the ContentClient's renderer before calling
125 // RenderViewTest::SetUp(). 125 // RenderViewTest::SetUp().
126 if (!GetContentClient()->renderer()) 126 if (!GetContentClient()->renderer())
127 GetContentClient()->set_renderer(&content_renderer_client_); 127 GetContentClient()->set_renderer_for_testing(&content_renderer_client_);
128 128
129 // Subclasses can set render_thread_ with their own implementation before 129 // Subclasses can set render_thread_ with their own implementation before
130 // calling RenderViewTest::SetUp(). 130 // calling RenderViewTest::SetUp().
131 if (!render_thread_.get()) 131 if (!render_thread_.get())
132 render_thread_.reset(new MockRenderThread()); 132 render_thread_.reset(new MockRenderThread());
133 render_thread_->set_routing_id(kRouteId); 133 render_thread_->set_routing_id(kRouteId);
134 render_thread_->set_surface_id(kSurfaceId); 134 render_thread_->set_surface_id(kSurfaceId);
135 render_thread_->set_new_window_routing_id(kNewWindowRouteId); 135 render_thread_->set_new_window_routing_id(kNewWindowRouteId);
136 136
137 command_line_.reset(new CommandLine(CommandLine::NO_PROGRAM)); 137 command_line_.reset(new CommandLine(CommandLine::NO_PROGRAM));
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 348
349 ViewMsg_Navigate navigate_message(impl->GetRoutingID(), navigate_params); 349 ViewMsg_Navigate navigate_message(impl->GetRoutingID(), navigate_params);
350 OnMessageReceived(navigate_message); 350 OnMessageReceived(navigate_message);
351 351
352 // The load actually happens asynchronously, so we pump messages to process 352 // The load actually happens asynchronously, so we pump messages to process
353 // the pending continuation. 353 // the pending continuation.
354 ProcessPendingMessages(); 354 ProcessPendingMessages();
355 } 355 }
356 356
357 } // namespace content 357 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698