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

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

Issue 11091058: Reland r161256: Fix the crash that was happening on the buildbot (but not trybots, for a strange re… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 2 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
« no previous file with comments | « no previous file | content/renderer/browser_plugin/browser_plugin_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 // This check is needed because when run under content_browsertests,
154 // ResourceBundle isn't initialized (since we have to use a diferent test
155 // suite implementation than for content_unittests). For browser_tests, this
156 // is already initialized.
157 if (!ResourceBundle::HasSharedInstance())
158 ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL);
154 159
155 mock_process_.reset(new MockRenderProcess); 160 mock_process_.reset(new MockRenderProcess);
156 161
157 // This needs to pass the mock render thread to the view. 162 // This needs to pass the mock render thread to the view.
158 RenderViewImpl* view = RenderViewImpl::Create( 163 RenderViewImpl* view = RenderViewImpl::Create(
159 0, 164 0,
160 kOpenerId, 165 kOpenerId,
161 content::RendererPreferences(), 166 content::RendererPreferences(),
162 webkit_glue::WebPreferences(), 167 webkit_glue::WebPreferences(),
163 new SharedRenderViewCounter(0), 168 new SharedRenderViewCounter(0),
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 366
362 ViewMsg_Navigate navigate_message(impl->GetRoutingID(), navigate_params); 367 ViewMsg_Navigate navigate_message(impl->GetRoutingID(), navigate_params);
363 OnMessageReceived(navigate_message); 368 OnMessageReceived(navigate_message);
364 369
365 // The load actually happens asynchronously, so we pump messages to process 370 // The load actually happens asynchronously, so we pump messages to process
366 // the pending continuation. 371 // the pending continuation.
367 ProcessPendingMessages(); 372 ProcessPendingMessages();
368 } 373 }
369 374
370 } // namespace content 375 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/renderer/browser_plugin/browser_plugin_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698