summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/tools/testserver/run_testserver.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/net/tools/testserver/run_testserver.cc b/net/tools/testserver/run_testserver.cc
index bfaa682..06fa577 100644
--- a/net/tools/testserver/run_testserver.cc
+++ b/net/tools/testserver/run_testserver.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -9,6 +9,7 @@
#include "base/file_path.h"
#include "base/logging.h"
#include "base/message_loop.h"
+#include "base/utf_string_conversions.h"
#include "net/test/test_server.h"
static void PrintUsage() {
@@ -62,6 +63,12 @@ int main(int argc, const char* argv[]) {
return -1;
}
+ if (!file_util::DirectoryExists(test_server.document_root())) {
+ printf("Error: invalid doc root: \"%s\" does not exist!\n",
+ UTF16ToUTF8(test_server.document_root().LossyDisplayName()).c_str());
+ return -1;
+ }
+
printf("testserver running at %s (type ctrl+c to exit)\n",
test_server.host_port_pair().ToString().c_str());