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

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

Issue 8387039: Move content_restriction.h and main_function_params.h to content/public/common, and put them in t... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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 | « content/test/render_view_test.h ('k') | content/utility/utility_main.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/test/render_view_test.h" 5 #include "content/test/render_view_test.h"
6 6
7 #include "content/common/dom_storage_common.h" 7 #include "content/common/dom_storage_common.h"
8 #include "content/common/renderer_preferences.h" 8 #include "content/common/renderer_preferences.h"
9 #include "content/common/view_messages.h" 9 #include "content/common/view_messages.h"
10 #include "content/public/browser/native_web_keyboard_event.h" 10 #include "content/public/browser/native_web_keyboard_event.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 if (!GetContentClient()->renderer()) 90 if (!GetContentClient()->renderer())
91 GetContentClient()->set_renderer(&mock_content_renderer_client_); 91 GetContentClient()->set_renderer(&mock_content_renderer_client_);
92 92
93 // Subclasses can set render_thread_ with their own implementation before 93 // Subclasses can set render_thread_ with their own implementation before
94 // calling RenderViewTest::SetUp(). 94 // calling RenderViewTest::SetUp().
95 if (!render_thread_.get()) 95 if (!render_thread_.get())
96 render_thread_.reset(new MockRenderThread()); 96 render_thread_.reset(new MockRenderThread());
97 render_thread_->set_routing_id(kRouteId); 97 render_thread_->set_routing_id(kRouteId);
98 98
99 command_line_.reset(new CommandLine(CommandLine::NO_PROGRAM)); 99 command_line_.reset(new CommandLine(CommandLine::NO_PROGRAM));
100 params_.reset(new MainFunctionParams(*command_line_)); 100 params_.reset(new content::MainFunctionParams(*command_line_));
101 platform_.reset(new RendererMainPlatformDelegate(*params_)); 101 platform_.reset(new RendererMainPlatformDelegate(*params_));
102 platform_->PlatformInitialize(); 102 platform_->PlatformInitialize();
103 103
104 // Setting flags and really doing anything with WebKit is fairly fragile and 104 // Setting flags and really doing anything with WebKit is fairly fragile and
105 // hacky, but this is the world we live in... 105 // hacky, but this is the world we live in...
106 webkit_glue::SetJavaScriptFlags(" --expose-gc"); 106 webkit_glue::SetJavaScriptFlags(" --expose-gc");
107 WebKit::initialize(&webkit_platform_support_); 107 WebKit::initialize(&webkit_platform_support_);
108 108
109 mock_process_.reset(new MockRenderProcess); 109 mock_process_.reset(new MockRenderProcess);
110 110
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); 336 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_);
337 impl->set_send_content_state_immediately(true); 337 impl->set_send_content_state_immediately(true);
338 } 338 }
339 339
340 WebKit::WebWidget* RenderViewTest::GetWebWidget() { 340 WebKit::WebWidget* RenderViewTest::GetWebWidget() {
341 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); 341 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_);
342 return impl->webwidget(); 342 return impl->webwidget();
343 } 343 }
344 344
345 } // namespace content 345 } // namespace content
OLDNEW
« no previous file with comments | « content/test/render_view_test.h ('k') | content/utility/utility_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698