summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-25 00:11:31 +0000
committerwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-25 00:11:31 +0000
commite953d76afc04c4bb5357866836116a25e5296924 (patch)
treed4e48bc50a990b8e886f3e3fef5902115df409f2 /webkit
parent0f52c980c49e14e2dc62bf12d99490a2505cfa9a (diff)
downloadchromium_src-e953d76afc04c4bb5357866836116a25e5296924.zip
chromium_src-e953d76afc04c4bb5357866836116a25e5296924.tar.gz
chromium_src-e953d76afc04c4bb5357866836116a25e5296924.tar.bz2
Hook up test_shell with the new FTP implementation. On Windows
this is enabled by the --new-ftp command-line switch. On Mac and Linux this is always enabled. Fix some cpplint nits. Remove the obsolete "net/http/http_network_layer.h" inclusion. R=darin BUG=http://crbug.com/4965 TEST=none Review URL: http://codereview.chromium.org/147061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19202 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/DEPS1
-rw-r--r--webkit/tools/test_shell/test_shell_request_context.cc13
-rw-r--r--webkit/tools/test_shell/test_shell_switches.cc9
-rw-r--r--webkit/tools/test_shell/test_shell_switches.h3
-rw-r--r--webkit/tools/test_shell/test_shell_win.cc1
5 files changed, 22 insertions, 5 deletions
diff --git a/webkit/DEPS b/webkit/DEPS
index 5a49782..74ee587 100644
--- a/webkit/DEPS
+++ b/webkit/DEPS
@@ -14,6 +14,7 @@ include_rules = [
# TODO(brettw) - review these; move up if it's ok, or remove the dependency
"+net/base",
+ "+net/ftp",
"+net/http",
"+net/proxy",
"+net/socket",
diff --git a/webkit/tools/test_shell/test_shell_request_context.cc b/webkit/tools/test_shell/test_shell_request_context.cc
index e007cc6..480ba9c 100644
--- a/webkit/tools/test_shell/test_shell_request_context.cc
+++ b/webkit/tools/test_shell/test_shell_request_context.cc
@@ -4,10 +4,13 @@
#include "webkit/tools/test_shell/test_shell_request_context.h"
+#include "base/command_line.h"
#include "net/base/cookie_monster.h"
#include "net/base/host_resolver.h"
+#include "net/ftp/ftp_network_layer.h"
#include "net/proxy/proxy_service.h"
#include "webkit/glue/webkit_glue.h"
+#include "webkit/tools/test_shell/test_shell_switches.h"
TestShellRequestContext::TestShellRequestContext() {
Init(std::wstring(), net::HttpCache::NORMAL, false);
@@ -54,10 +57,20 @@ void TestShellRequestContext::Init(
}
cache->set_mode(cache_mode);
http_transaction_factory_ = cache;
+
+ // The kNewFtp switch is Windows specific only because we have multiple FTP
+ // implementations on Windows.
+#if defined(OS_WIN)
+ if (CommandLine::ForCurrentProcess()->HasSwitch(test_shell::kNewFtp))
+ ftp_transaction_factory_ = new net::FtpNetworkLayer(host_resolver_);
+#else
+ ftp_transaction_factory_ = new net::FtpNetworkLayer(host_resolver_);
+#endif
}
TestShellRequestContext::~TestShellRequestContext() {
delete cookie_store_;
+ delete ftp_transaction_factory_;
delete http_transaction_factory_;
delete proxy_service_;
delete host_resolver_;
diff --git a/webkit/tools/test_shell/test_shell_switches.cc b/webkit/tools/test_shell/test_shell_switches.cc
index ed8dd07..ccedc96 100644
--- a/webkit/tools/test_shell/test_shell_switches.cc
+++ b/webkit/tools/test_shell/test_shell_switches.cc
@@ -45,6 +45,9 @@ const wchar_t kDumpStatsTable[] = L"stats";
// Use a specified cache directory.
const wchar_t kCacheDir[] = L"cache-dir";
+// Temparary option for new ftp implemetation.
+const wchar_t kNewFtp[] = L"new-ftp";
+
// When being run through a memory profiler, trigger memory in use dumps at
// startup and just prior to shutdown.
const wchar_t kDebugMemoryInUse[] = L"debug-memory-in-use";
@@ -64,9 +67,9 @@ const wchar_t kAllowScriptsToCloseWindows[] = L"allow-scripts-to-close-windows";
extern const wchar_t kCheckLayoutTestSystemDeps[] =
L"check-layout-test-sys-deps";
-// If set, we are running under GDB so allow a certain class of errors
-// to happen even if in layout test mode.
-extern const wchar_t kGDB[] = L"gdb";
+// If set, we are running under GDB so allow a certain class of errors
+// to happen even if in layout test mode.
+extern const wchar_t kGDB[] = L"gdb";
// Make functions of the Profiler class available in javascript
extern const wchar_t kProfiler[] = L"profiler";
diff --git a/webkit/tools/test_shell/test_shell_switches.h b/webkit/tools/test_shell/test_shell_switches.h
index 7743aa6..402e722 100644
--- a/webkit/tools/test_shell/test_shell_switches.h
+++ b/webkit/tools/test_shell/test_shell_switches.h
@@ -23,12 +23,13 @@ extern const wchar_t kPlaybackMode[];
extern const wchar_t kNoEvents[];
extern const wchar_t kDumpStatsTable[];
extern const wchar_t kCacheDir[];
+extern const wchar_t kNewFtp[];
extern const wchar_t kDebugMemoryInUse[];
extern const wchar_t kEnableFileCookies[];
extern const wchar_t kEnableTracing[];
extern const wchar_t kAllowScriptsToCloseWindows[];
extern const wchar_t kCheckLayoutTestSystemDeps[];
-extern const wchar_t kGDB[];
+extern const wchar_t kGDB[];
extern const wchar_t kProfiler[];
} // namespace test_shell
diff --git a/webkit/tools/test_shell/test_shell_win.cc b/webkit/tools/test_shell/test_shell_win.cc
index bc4fb43..896cdaf 100644
--- a/webkit/tools/test_shell/test_shell_win.cc
+++ b/webkit/tools/test_shell/test_shell_win.cc
@@ -25,7 +25,6 @@
#include "breakpad/src/client/windows/handler/exception_handler.h"
#include "grit/webkit_resources.h"
#include "net/base/net_module.h"
-#include "net/http/http_network_layer.h"
#include "net/url_request/url_request_file_job.h"
#include "skia/ext/bitmap_platform_device.h"
#include "webkit/glue/webframe.h"