| OLD | NEW |
| 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 "base/run_loop.h" | 7 #include "base/run_loop.h" |
| 8 #include "content/common/view_messages.h" | 8 #include "content/common/view_messages.h" |
| 9 #include "content/public/browser/native_web_keyboard_event.h" | 9 #include "content/public/browser/native_web_keyboard_event.h" |
| 10 #include "content/public/common/renderer_preferences.h" | 10 #include "content/public/common/renderer_preferences.h" |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 void RenderViewTest::SetUp() { | 126 void RenderViewTest::SetUp() { |
| 127 // Subclasses can set the ContentClient's renderer before calling | 127 // Subclasses can set the ContentClient's renderer before calling |
| 128 // RenderViewTest::SetUp(). | 128 // RenderViewTest::SetUp(). |
| 129 ContentRendererClient* old_client = | 129 ContentRendererClient* old_client = |
| 130 SetRendererClientForTesting(&content_renderer_client_); | 130 SetRendererClientForTesting(&content_renderer_client_); |
| 131 if (old_client) | 131 if (old_client) |
| 132 SetRendererClientForTesting(old_client); | 132 SetRendererClientForTesting(old_client); |
| 133 | 133 |
| 134 // Subclasses can set render_thread_ with their own implementation before | 134 // Subclasses can set render_thread_ with their own implementation before |
| 135 // calling RenderViewTest::SetUp(). | 135 // calling RenderViewTest::SetUp(). |
| 136 if (!render_thread_.get()) | 136 if (!render_thread_) |
| 137 render_thread_.reset(new MockRenderThread()); | 137 render_thread_.reset(new MockRenderThread()); |
| 138 render_thread_->set_routing_id(kRouteId); | 138 render_thread_->set_routing_id(kRouteId); |
| 139 render_thread_->set_surface_id(kSurfaceId); | 139 render_thread_->set_surface_id(kSurfaceId); |
| 140 render_thread_->set_new_window_routing_id(kNewWindowRouteId); | 140 render_thread_->set_new_window_routing_id(kNewWindowRouteId); |
| 141 | 141 |
| 142 command_line_.reset(new CommandLine(CommandLine::NO_PROGRAM)); | 142 command_line_.reset(new CommandLine(CommandLine::NO_PROGRAM)); |
| 143 params_.reset(new MainFunctionParams(*command_line_)); | 143 params_.reset(new MainFunctionParams(*command_line_)); |
| 144 platform_.reset(new RendererMainPlatformDelegate(*params_)); | 144 platform_.reset(new RendererMainPlatformDelegate(*params_)); |
| 145 platform_->PlatformInitialize(); | 145 platform_->PlatformInitialize(); |
| 146 | 146 |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 | 360 |
| 361 ViewMsg_Navigate navigate_message(impl->GetRoutingID(), navigate_params); | 361 ViewMsg_Navigate navigate_message(impl->GetRoutingID(), navigate_params); |
| 362 OnMessageReceived(navigate_message); | 362 OnMessageReceived(navigate_message); |
| 363 | 363 |
| 364 // The load actually happens asynchronously, so we pump messages to process | 364 // The load actually happens asynchronously, so we pump messages to process |
| 365 // the pending continuation. | 365 // the pending continuation. |
| 366 ProcessPendingMessages(); | 366 ProcessPendingMessages(); |
| 367 } | 367 } |
| 368 | 368 |
| 369 } // namespace content | 369 } // namespace content |
| OLD | NEW |