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

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

Issue 2530573002: Share field trial allocator on zygote-using Linuxes (Closed)
Patch Set: fix call from content_main_runner Created 4 years 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
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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <cctype> 9 #include <cctype>
10 10
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 render_thread_->set_new_window_routing_id(kNewWindowRouteId); 265 render_thread_->set_new_window_routing_id(kNewWindowRouteId);
266 render_thread_->set_new_window_main_frame_widget_routing_id( 266 render_thread_->set_new_window_main_frame_widget_routing_id(
267 kNewFrameWidgetRouteId); 267 kNewFrameWidgetRouteId);
268 render_thread_->set_new_frame_routing_id(kNewFrameRouteId); 268 render_thread_->set_new_frame_routing_id(kNewFrameRouteId);
269 269
270 #if defined(OS_MACOSX) 270 #if defined(OS_MACOSX)
271 autorelease_pool_.reset(new base::mac::ScopedNSAutoreleasePool()); 271 autorelease_pool_.reset(new base::mac::ScopedNSAutoreleasePool());
272 #endif 272 #endif
273 command_line_.reset(new base::CommandLine(base::CommandLine::NO_PROGRAM)); 273 command_line_.reset(new base::CommandLine(base::CommandLine::NO_PROGRAM));
274 field_trial_list_.reset(new base::FieldTrialList(nullptr)); 274 field_trial_list_.reset(new base::FieldTrialList(nullptr));
275 // We don't use the descriptor here anyways so it's ok to pass 1.
Alexei Svitkine (slow) 2016/11/29 19:32:47 -1
lawrencewu 2016/11/29 19:52:44 Fixed.
275 base::FieldTrialList::CreateTrialsFromCommandLine( 276 base::FieldTrialList::CreateTrialsFromCommandLine(
276 *command_line_, switches::kFieldTrialHandle); 277 *command_line_, switches::kFieldTrialHandle, -1);
277 params_.reset(new MainFunctionParams(*command_line_)); 278 params_.reset(new MainFunctionParams(*command_line_));
278 platform_.reset(new RendererMainPlatformDelegate(*params_)); 279 platform_.reset(new RendererMainPlatformDelegate(*params_));
279 platform_->PlatformInitialize(); 280 platform_->PlatformInitialize();
280 281
281 // Setting flags and really doing anything with WebKit is fairly fragile and 282 // Setting flags and really doing anything with WebKit is fairly fragile and
282 // hacky, but this is the world we live in... 283 // hacky, but this is the world we live in...
283 std::string flags("--expose-gc"); 284 std::string flags("--expose-gc");
284 v8::V8::SetFlagsFromString(flags.c_str(), static_cast<int>(flags.size())); 285 v8::V8::SetFlagsFromString(flags.c_str(), static_cast<int>(flags.size()));
285 286
286 // Ensure that we register any necessary schemes when initializing WebKit, 287 // Ensure that we register any necessary schemes when initializing WebKit,
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 static_cast<TestRenderFrame*>(impl->GetMainRenderFrame()); 664 static_cast<TestRenderFrame*>(impl->GetMainRenderFrame());
664 frame->Navigate(common_params, StartNavigationParams(), request_params); 665 frame->Navigate(common_params, StartNavigationParams(), request_params);
665 666
666 // The load actually happens asynchronously, so we pump messages to process 667 // The load actually happens asynchronously, so we pump messages to process
667 // the pending continuation. 668 // the pending continuation.
668 FrameLoadWaiter(frame).Wait(); 669 FrameLoadWaiter(frame).Wait();
669 view_->GetWebView()->updateAllLifecyclePhases(); 670 view_->GetWebView()->updateAllLifecyclePhases();
670 } 671 }
671 672
672 } // namespace content 673 } // namespace content
OLDNEW
« content/app/content_main_runner.cc ('K') | « content/public/common/content_descriptors.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698