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

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

Issue 457103003: Merge ResourceBundle's InitSharedInstanceLocaleOnly with InitSharedInstanceWithLocale(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 "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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 (!ResourceBundle::HasSharedInstance())
180 ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL); 180 ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL, true);
181 181
182 mock_process_.reset(new MockRenderProcess); 182 mock_process_.reset(new MockRenderProcess);
183 183
184 // This needs to pass the mock render thread to the view. 184 // This needs to pass the mock render thread to the view.
185 RenderViewImpl* view = 185 RenderViewImpl* view =
186 RenderViewImpl::Create(kOpenerId, 186 RenderViewImpl::Create(kOpenerId,
187 false, // window_was_created_with_opener 187 false, // window_was_created_with_opener
188 RendererPreferences(), 188 RendererPreferences(),
189 WebPreferences(), 189 WebPreferences(),
190 kRouteId, 190 kRouteId,
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 FrameMsg_Navigate navigate_message(impl->main_render_frame()->GetRoutingID(), 421 FrameMsg_Navigate navigate_message(impl->main_render_frame()->GetRoutingID(),
422 navigate_params); 422 navigate_params);
423 impl->main_render_frame()->OnMessageReceived(navigate_message); 423 impl->main_render_frame()->OnMessageReceived(navigate_message);
424 424
425 // The load actually happens asynchronously, so we pump messages to process 425 // The load actually happens asynchronously, so we pump messages to process
426 // the pending continuation. 426 // the pending continuation.
427 FrameLoadWaiter(view_->GetMainRenderFrame()).Wait(); 427 FrameLoadWaiter(view_->GetMainRenderFrame()).Wait();
428 } 428 }
429 429
430 } // namespace content 430 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698