OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <stdio.h> | 5 #include <stdio.h> |
6 | 6 |
7 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 return -1; | 48 return -1; |
49 } | 49 } |
50 | 50 |
51 // Launch testserver | 51 // Launch testserver |
52 scoped_refptr<BaseTestServer> test_server; | 52 scoped_refptr<BaseTestServer> test_server; |
53 if (protocol == "https") { | 53 if (protocol == "https") { |
54 test_server = HTTPSTestServer::CreateGoodServer(doc_root); | 54 test_server = HTTPSTestServer::CreateGoodServer(doc_root); |
55 } else if (protocol == "ftp") { | 55 } else if (protocol == "ftp") { |
56 test_server = FTPTestServer::CreateServer(doc_root); | 56 test_server = FTPTestServer::CreateServer(doc_root); |
57 } else if (protocol == "http") { | 57 } else if (protocol == "http") { |
58 test_server = HTTPTestServer::CreateServer(doc_root, NULL); | 58 test_server = HTTPTestServer::CreateServer(doc_root); |
59 } else { | 59 } else { |
60 NOTREACHED(); | 60 NOTREACHED(); |
61 } | 61 } |
62 | 62 |
63 printf("testserver running at %s://%s:%d (type ctrl+c to exit)\n", | 63 printf("testserver running at %s://%s:%d (type ctrl+c to exit)\n", |
64 protocol.c_str(), | 64 protocol.c_str(), |
65 net::TestServerLauncher::kHostName, | 65 net::TestServerLauncher::kHostName, |
66 port); | 66 port); |
67 | 67 |
68 message_loop.Run(); | 68 message_loop.Run(); |
69 return 0; | 69 return 0; |
70 } | 70 } |
OLD | NEW |