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

Unified Diff: content/shell/shell_resource_dispatcher_host_delegate.cc

Issue 10860066: [content shell] disable the auth prompt during layout tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/shell_resource_dispatcher_host_delegate.cc
diff --git a/content/shell/shell_resource_dispatcher_host_delegate.cc b/content/shell/shell_resource_dispatcher_host_delegate.cc
index 8191e6aac9130d332b0a7c4661d244f7d4e34f9b..23d4124fb22932cee6dc132c40692e5437470335 100644
--- a/content/shell/shell_resource_dispatcher_host_delegate.cc
+++ b/content/shell/shell_resource_dispatcher_host_delegate.cc
@@ -4,7 +4,9 @@
#include "content/shell/shell_resource_dispatcher_host_delegate.h"
+#include "base/command_line.h"
#include "content/shell/shell_login_dialog.h"
+#include "content/shell/shell_switches.h"
namespace content {
@@ -17,8 +19,9 @@ ShellResourceDispatcherHostDelegate::~ShellResourceDispatcherHostDelegate() {
bool ShellResourceDispatcherHostDelegate::AcceptAuthRequest(
net::URLRequest* request,
net::AuthChallengeInfo* auth_info) {
- // Why not give it a try?
- return true;
+ bool accept_auth_request =
+ !CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree);
+ return accept_auth_request;
}
ResourceDispatcherHostLoginDelegate*
« 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