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

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, 5 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 | « chrome_frame/test/test_mock_with_web_server.cc ('k') | chrome_frame/test/test_server.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/test/test_server.h
===================================================================
--- chrome_frame/test/test_server.h (revision 51968)
+++ chrome_frame/test/test_server.h (working copy)
@@ -370,17 +370,30 @@
// 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;
+ // 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);
@@ -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_
« no previous file with comments | « chrome_frame/test/test_mock_with_web_server.cc ('k') | chrome_frame/test/test_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698