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/dom_storage/dom_storage_types.h" | 8 #include "content/common/dom_storage/dom_storage_types.h" |
9 #include "content/common/frame_messages.h" | 9 #include "content/common/frame_messages.h" |
10 #include "content/common/input_messages.h" | 10 #include "content/common/input_messages.h" |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 blink::initialize(webkit_platform_support_.Get()); | 169 blink::initialize(webkit_platform_support_.Get()); |
170 | 170 |
171 // Ensure that we register any necessary schemes when initializing WebKit, | 171 // Ensure that we register any necessary schemes when initializing WebKit, |
172 // since we are using a MockRenderThread. | 172 // since we are using a MockRenderThread. |
173 RenderThreadImpl::RegisterSchemes(); | 173 RenderThreadImpl::RegisterSchemes(); |
174 | 174 |
175 // This check is needed because when run under content_browsertests, | 175 // This check is needed because when run under content_browsertests, |
176 // ResourceBundle isn't initialized (since we have to use a diferent test | 176 // ResourceBundle isn't initialized (since we have to use a diferent test |
177 // suite implementation than for content_unittests). For browser_tests, this | 177 // suite implementation than for content_unittests). For browser_tests, this |
178 // is already initialized. | 178 // is already initialized. |
179 if (!ResourceBundle::HasSharedInstance()) | 179 if (!ui::ResourceBundle::HasSharedInstance()) |
180 ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL); | 180 ui::ResourceBundle::InitSharedInstanceWithLocale( |
| 181 "en-US", NULL, ui::ResourceBundle::LOAD_COMMON_RESOURCES); |
181 | 182 |
182 mock_process_.reset(new MockRenderProcess); | 183 mock_process_.reset(new MockRenderProcess); |
183 | 184 |
184 // This needs to pass the mock render thread to the view. | 185 // This needs to pass the mock render thread to the view. |
185 RenderViewImpl* view = | 186 RenderViewImpl* view = |
186 RenderViewImpl::Create(kOpenerId, | 187 RenderViewImpl::Create(kOpenerId, |
187 false, // window_was_created_with_opener | 188 false, // window_was_created_with_opener |
188 RendererPreferences(), | 189 RendererPreferences(), |
189 WebPreferences(), | 190 WebPreferences(), |
190 kRouteId, | 191 kRouteId, |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 FrameMsg_Navigate navigate_message(impl->main_render_frame()->GetRoutingID(), | 422 FrameMsg_Navigate navigate_message(impl->main_render_frame()->GetRoutingID(), |
422 navigate_params); | 423 navigate_params); |
423 impl->main_render_frame()->OnMessageReceived(navigate_message); | 424 impl->main_render_frame()->OnMessageReceived(navigate_message); |
424 | 425 |
425 // The load actually happens asynchronously, so we pump messages to process | 426 // The load actually happens asynchronously, so we pump messages to process |
426 // the pending continuation. | 427 // the pending continuation. |
427 FrameLoadWaiter(view_->GetMainRenderFrame()).Wait(); | 428 FrameLoadWaiter(view_->GetMainRenderFrame()).Wait(); |
428 } | 429 } |
429 | 430 |
430 } // namespace content | 431 } // namespace content |
OLD | NEW |