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

Side by Side Diff: content/shell/app/shell_main_delegate.cc

Issue 16026006: Introduce the notion of a "layout test mode" instead of turning individual flags on and off (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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/shell/app/shell_main_delegate.h" 5 #include "content/shell/app/shell_main_delegate.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 InitLogging(); 105 InitLogging();
106 CommandLine& command_line = *CommandLine::ForCurrentProcess(); 106 CommandLine& command_line = *CommandLine::ForCurrentProcess();
107 if (command_line.HasSwitch(switches::kCheckLayoutTestSysDeps)) { 107 if (command_line.HasSwitch(switches::kCheckLayoutTestSysDeps)) {
108 if (!CheckLayoutSystemDeps()) { 108 if (!CheckLayoutSystemDeps()) {
109 if (exit_code) 109 if (exit_code)
110 *exit_code = 1; 110 *exit_code = 1;
111 return true; 111 return true;
112 } 112 }
113 } 113 }
114 if (command_line.HasSwitch(switches::kDumpRenderTree)) { 114 if (command_line.HasSwitch(switches::kDumpRenderTree)) {
115 EnableBrowserLayoutTestMode();
116
115 command_line.AppendSwitch(switches::kProcessPerTab); 117 command_line.AppendSwitch(switches::kProcessPerTab);
116 command_line.AppendSwitch(switches::kAllowFileAccessFromFiles); 118 command_line.AppendSwitch(switches::kAllowFileAccessFromFiles);
117 command_line.AppendSwitchASCII( 119 command_line.AppendSwitchASCII(
118 switches::kUseGL, gfx::kGLImplementationOSMesaName); 120 switches::kUseGL, gfx::kGLImplementationOSMesaName);
119 SetAllowOSMesaImageTransportForTesting();
120 DisableSystemDragDrop();
121 DisableModalPopupMenus();
122 command_line.AppendSwitch(switches::kSkipGpuDataLoading); 121 command_line.AppendSwitch(switches::kSkipGpuDataLoading);
123 command_line.AppendSwitch(switches::kEnableExperimentalWebKitFeatures); 122 command_line.AppendSwitch(switches::kEnableExperimentalWebKitFeatures);
124 command_line.AppendSwitch(switches::kEnableCssShaders); 123 command_line.AppendSwitch(switches::kEnableCssShaders);
125 command_line.AppendSwitchASCII(switches::kTouchEvents, 124 command_line.AppendSwitchASCII(switches::kTouchEvents,
126 switches::kTouchEventsEnabled); 125 switches::kTouchEventsEnabled);
127 command_line.AppendSwitch(switches::kEnableGestureTapHighlight); 126 command_line.AppendSwitch(switches::kEnableGestureTapHighlight);
128 command_line.AppendSwitch(cc::switches::kDisableThreadedAnimation); 127 command_line.AppendSwitch(cc::switches::kDisableThreadedAnimation);
129 if (command_line.HasSwitch(switches::kEnableSoftwareCompositing)) 128 if (command_line.HasSwitch(switches::kEnableSoftwareCompositing))
130 command_line.AppendSwitch(switches::kEnableSoftwareCompositingGLAdapter); 129 command_line.AppendSwitch(switches::kEnableSoftwareCompositingGLAdapter);
131 130
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 browser_client_.reset(new ShellContentBrowserClient); 200 browser_client_.reset(new ShellContentBrowserClient);
202 return browser_client_.get(); 201 return browser_client_.get();
203 } 202 }
204 203
205 ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() { 204 ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() {
206 renderer_client_.reset(new ShellContentRendererClient); 205 renderer_client_.reset(new ShellContentRendererClient);
207 return renderer_client_.get(); 206 return renderer_client_.get();
208 } 207 }
209 208
210 } // namespace content 209 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/renderer_webapplicationcachehost_impl.cc ('k') | content/shell/renderer/shell_render_process_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698