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

Unified Diff: content/shell/browser/shell_content_browser_client.cc

Issue 641593002: Content Shell: LayoutTestResourceDispatcherHostDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@LayoutTestJavaScriptDialogManager
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: content/shell/browser/shell_content_browser_client.cc
diff --git a/content/shell/browser/shell_content_browser_client.cc b/content/shell/browser/shell_content_browser_client.cc
index 8be9b36e0be04d6a41984b89517ab64c278d3730..5dc4390106b9d1fd9cb757d910206d8b6413fa6d 100644
--- a/content/shell/browser/shell_content_browser_client.cc
+++ b/content/shell/browser/shell_content_browser_client.cc
@@ -17,6 +17,7 @@
#include "content/public/common/url_constants.h"
#include "content/public/common/web_preferences.h"
#include "content/shell/browser/ipc_echo_message_filter.h"
+#include "content/shell/browser/layout_test/layout_test_resource_dispatcher_host_delegate.h"
#include "content/shell/browser/shell.h"
#include "content/shell/browser/shell_browser_context.h"
#include "content/shell/browser/shell_browser_main_parts.h"
@@ -284,7 +285,9 @@ void ShellContentBrowserClient::OverrideWebkitPrefs(
void ShellContentBrowserClient::ResourceDispatcherHostCreated() {
resource_dispatcher_host_delegate_.reset(
- new ShellResourceDispatcherHostDelegate());
+ CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)
+ ? new LayoutTestResourceDispatcherHostDelegate
+ : new ShellResourceDispatcherHostDelegate);
ResourceDispatcherHost::Get()->SetDelegate(
resource_dispatcher_host_delegate_.get());
}

Powered by Google App Engine
This is Rietveld 408576698