| 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 "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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 | 143 |
| 144 // Setting flags and really doing anything with WebKit is fairly fragile and | 144 // Setting flags and really doing anything with WebKit is fairly fragile and |
| 145 // hacky, but this is the world we live in... | 145 // hacky, but this is the world we live in... |
| 146 webkit_glue::SetJavaScriptFlags(" --expose-gc"); | 146 webkit_glue::SetJavaScriptFlags(" --expose-gc"); |
| 147 WebKit::initialize(webkit_platform_support_.Get()); | 147 WebKit::initialize(webkit_platform_support_.Get()); |
| 148 | 148 |
| 149 // Ensure that we register any necessary schemes when initializing WebKit, | 149 // Ensure that we register any necessary schemes when initializing WebKit, |
| 150 // since we are using a MockRenderThread. | 150 // since we are using a MockRenderThread. |
| 151 RenderThreadImpl::RegisterSchemes(); | 151 RenderThreadImpl::RegisterSchemes(); |
| 152 | 152 |
| 153 ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL); | 153 //ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL); |
| 154 | 154 |
| 155 mock_process_.reset(new MockRenderProcess); | 155 mock_process_.reset(new MockRenderProcess); |
| 156 | 156 |
| 157 // This needs to pass the mock render thread to the view. | 157 // This needs to pass the mock render thread to the view. |
| 158 RenderViewImpl* view = RenderViewImpl::Create( | 158 RenderViewImpl* view = RenderViewImpl::Create( |
| 159 0, | 159 0, |
| 160 kOpenerId, | 160 kOpenerId, |
| 161 content::RendererPreferences(), | 161 content::RendererPreferences(), |
| 162 webkit_glue::WebPreferences(), | 162 webkit_glue::WebPreferences(), |
| 163 new SharedRenderViewCounter(0), | 163 new SharedRenderViewCounter(0), |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 | 361 |
| 362 ViewMsg_Navigate navigate_message(impl->GetRoutingID(), navigate_params); | 362 ViewMsg_Navigate navigate_message(impl->GetRoutingID(), navigate_params); |
| 363 OnMessageReceived(navigate_message); | 363 OnMessageReceived(navigate_message); |
| 364 | 364 |
| 365 // The load actually happens asynchronously, so we pump messages to process | 365 // The load actually happens asynchronously, so we pump messages to process |
| 366 // the pending continuation. | 366 // the pending continuation. |
| 367 ProcessPendingMessages(); | 367 ProcessPendingMessages(); |
| 368 } | 368 } |
| 369 | 369 |
| 370 } // namespace content | 370 } // namespace content |
| OLD | NEW |