summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-21 14:21:44 +0000
committerjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-21 14:21:44 +0000
commitb3a4575c1a294018f0e6131f3f9820e5787c4c21 (patch)
tree3940fc4cc6b0aeeb10839e46ed2a229978a426e5 /content
parente87e51138c56466cf5aab1452a0866de7297589a (diff)
downloadchromium_src-b3a4575c1a294018f0e6131f3f9820e5787c4c21.zip
chromium_src-b3a4575c1a294018f0e6131f3f9820e5787c4c21.tar.gz
chromium_src-b3a4575c1a294018f0e6131f3f9820e5787c4c21.tar.bz2
[content shell] disable the auth prompt during layout tests
BUG=111316 TEST=manually Review URL: https://chromiumcodereview.appspot.com/10860066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152556 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/shell/shell_resource_dispatcher_host_delegate.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/content/shell/shell_resource_dispatcher_host_delegate.cc b/content/shell/shell_resource_dispatcher_host_delegate.cc
index 8191e6a..23d4124 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*