summaryrefslogtreecommitdiffstats
path: root/webkit/glue/unittest_test_server.h
diff options
context:
space:
mode:
authorerikkay@google.com <erikkay@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-30 21:49:21 +0000
committererikkay@google.com <erikkay@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-30 21:49:21 +0000
commitbaf9e25f103eb1138fcd41d917728faee80e62e2 (patch)
tree8d9b78fc3afb7e9c79570873b2c7d5529d1a02be /webkit/glue/unittest_test_server.h
parent1ea316d7174804dd49c43fe4abcb15620b248634 (diff)
downloadchromium_src-baf9e25f103eb1138fcd41d917728faee80e62e2.zip
chromium_src-baf9e25f103eb1138fcd41d917728faee80e62e2.tar.gz
chromium_src-baf9e25f103eb1138fcd41d917728faee80e62e2.tar.bz2
Add FTP unit test in preparation for portable FTP implementation.
Clean up test server code. Originally from issue 12939, written by Ibrar Ahmed (ibrar.ahmed@gmail.com) Review URL: http://codereview.chromium.org/16490 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7508 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/unittest_test_server.h')
-rw-r--r--webkit/glue/unittest_test_server.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/webkit/glue/unittest_test_server.h b/webkit/glue/unittest_test_server.h
index d9b4ce2..3e27b875 100644
--- a/webkit/glue/unittest_test_server.h
+++ b/webkit/glue/unittest_test_server.h
@@ -14,14 +14,22 @@ using webkit_glue::ResourceLoaderBridge;
// We need to use ResourceLoaderBridge to communicate with the testserver
// instead of using URLRequest directly because URLRequests need to be run on
// the test_shell's IO thread.
-class UnittestTestServer : public TestServer {
+class UnittestTestServer : public HTTPTestServer {
+ protected:
+ UnittestTestServer() {
+ }
+
public:
- UnittestTestServer() : TestServer(TestServer::ManualInit()) {
- Init("localhost", 1337, L"webkit/data", std::wstring());
+ static UnittestTestServer* CreateServer() {
+ UnittestTestServer* test_server = new UnittestTestServer();
+ if (!test_server->Init("localhost", 1337, L"webkit/data")) {
+ delete test_server;
+ return NULL;
+ }
+ return test_server;
}
- ~UnittestTestServer() {
- Shutdown();
+ virtual ~UnittestTestServer() {
}
virtual bool MakeGETRequest(const std::string& page_name) {