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

Side by Side Diff: content/shell/shell_content_renderer_client.cc

Issue 12114046: [content shell] only instantiate webkit test runners for layout tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 | no next file » | 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/shell/shell_content_renderer_client.h" 5 #include "content/shell/shell_content_renderer_client.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "content/public/common/content_constants.h" 9 #include "content/public/common/content_constants.h"
10 #include "content/public/common/content_switches.h" 10 #include "content/public/common/content_switches.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 } 51 }
52 52
53 ShellContentRendererClient::~ShellContentRendererClient() { 53 ShellContentRendererClient::~ShellContentRendererClient() {
54 } 54 }
55 55
56 void ShellContentRendererClient::RenderThreadStarted() { 56 void ShellContentRendererClient::RenderThreadStarted() {
57 shell_observer_.reset(new ShellRenderProcessObserver()); 57 shell_observer_.reset(new ShellRenderProcessObserver());
58 } 58 }
59 59
60 void ShellContentRendererClient::RenderViewCreated(RenderView* render_view) { 60 void ShellContentRendererClient::RenderViewCreated(RenderView* render_view) {
61 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree))
62 return;
61 WebKitTestRunner* test_runner = new WebKitTestRunner(render_view); 63 WebKitTestRunner* test_runner = new WebKitTestRunner(render_view);
62 if (!ShellRenderProcessObserver::GetInstance()->test_delegate()) { 64 if (!ShellRenderProcessObserver::GetInstance()->test_delegate()) {
63 ShellRenderProcessObserver::GetInstance()->SetMainWindow(render_view, 65 ShellRenderProcessObserver::GetInstance()->SetMainWindow(render_view,
64 test_runner, 66 test_runner,
65 test_runner); 67 test_runner);
66 } 68 }
67 } 69 }
68 70
69 bool ShellContentRendererClient::OverrideCreatePlugin( 71 bool ShellContentRendererClient::OverrideCreatePlugin(
70 RenderView* render_view, 72 RenderView* render_view,
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 return true; 111 return true;
110 } 112 }
111 if (render_process_observer->test_delegate()) { 113 if (render_process_observer->test_delegate()) {
112 *new_url = render_process_observer->test_delegate()->rewriteLayoutTestsURL( 114 *new_url = render_process_observer->test_delegate()->rewriteLayoutTestsURL(
113 url.spec()); 115 url.spec());
114 } 116 }
115 return true; 117 return true;
116 } 118 }
117 119
118 } // namespace content 120 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698