Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(646)

Unified Diff: net/test/embedded_test_server/embedded_test_server.h

Issue 14914010: GTTF: Convert WebContentsImplBrowserTest to use EmbeddedTestServer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/net.gyp ('k') | net/test/embedded_test_server/embedded_test_server.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/test/embedded_test_server/embedded_test_server.h
diff --git a/net/test/embedded_test_server/embedded_test_server.h b/net/test/embedded_test_server/embedded_test_server.h
index 7f85374d8b7e1ebcb8b0ddaafd1d88a2882208b7..69662278b9923a8a74e29b64ebf802f3ca25bdce 100644
--- a/net/test/embedded_test_server/embedded_test_server.h
+++ b/net/test/embedded_test_server/embedded_test_server.h
@@ -17,6 +17,10 @@
#include "googleurl/src/gurl.h"
#include "net/socket/tcp_listen_socket.h"
+namespace base {
+class FilePath;
+}
+
namespace net {
namespace test_server {
@@ -107,6 +111,12 @@ class EmbeddedTestServer : public StreamListenSocket::Delegate {
// Returns the port number used by the server.
int port() const { return port_; }
+ // Registers request handler which serves files from |directory|.
+ // For instance, a request to "/foo.html" is served by "foo.html" under
+ // |directory|. Files under sub directories are also handled in the same way
+ // (i.e. "/foo/bar.html" is served by "foo/bar.html" under |directory|).
+ void ServeFilesFromDirectory(const base::FilePath& directory);
+
// The most general purpose method. Any request processing can be added using
// this method. Takes ownership of the object. The |callback| is called
// on UI thread.
« no previous file with comments | « net/net.gyp ('k') | net/test/embedded_test_server/embedded_test_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698