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

Unified Diff: chrome_frame/test/test_server.h

Issue 2822016: [chrome_frame] Refactor/merge IE no interference tests with other mock event ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 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
Index: chrome_frame/test/test_server.h
===================================================================
--- chrome_frame/test/test_server.h (revision 51119)
+++ chrome_frame/test/test_server.h (working copy)
@@ -370,18 +370,31 @@
// instance to send the response.
class HTTPTestServer : public ListenSocket::ListenSocketDelegate {
public:
- explicit HTTPTestServer(int port, const char* address);
+ explicit HTTPTestServer(int port, const std::wstring& address,
+ FilePath root_dir);
virtual ~HTTPTestServer();
+
// HTTP GET request is received. Override in derived classes.
// |connection| can be used to send the response.
virtual void Get(ConfigurableConnection* connection,
- const std::string& path, const Request& r) = 0;
+ const std::wstring& path, const Request& r) = 0;
+
// HTTP POST request is received. Override in derived classes.
// |connection| can be used to send the response
virtual void Post(ConfigurableConnection* connection,
- const std::string& path, const Request& r) = 0;
+ const std::wstring& path, const Request& r) = 0;
-private:
+ // Return the appropriate url with the specified path for this server.
+ std::wstring Resolve(const std::wstring& path);
+
+ FilePath root_dir() { return root_dir_; }
+
+ protected:
+ int port_;
+ std::wstring address_;
+ FilePath root_dir_;
+
+ private:
typedef std::list<scoped_refptr<ConfigurableConnection> > ConnectionList;
ConnectionList::iterator FindConnection(const ListenSocket* socket);
scoped_refptr<ConfigurableConnection> ConnectionFromSocket(
@@ -394,10 +407,10 @@
scoped_refptr<ListenSocket> server_;
ConnectionList connection_list_;
+
DISALLOW_COPY_AND_ASSIGN(HTTPTestServer);
};
-
} // namespace test_server
#endif // CHROME_FRAME_TEST_TEST_SERVER_H_

Powered by Google App Engine
This is Rietveld 408576698