Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / net / test / embedded_test_server / embedded_test_server.h
index 82303e5..24ff8d7 100644 (file)
@@ -35,7 +35,7 @@ class HttpListenSocket : public TCPListenSocket {
  public:
   HttpListenSocket(const SocketDescriptor socket_descriptor,
                    StreamListenSocket::Delegate* delegate);
-  virtual ~HttpListenSocket();
+  ~HttpListenSocket() override;
   virtual void Listen();
 
   // Listen on the current IO thread. If the IO thread has changed since this
@@ -106,7 +106,7 @@ class EmbeddedTestServer : public StreamListenSocket::Delegate {
   // Creates a http test server. InitializeAndWaitUntilReady() must be called
   // to start the server.
   EmbeddedTestServer();
-  virtual ~EmbeddedTestServer();
+  ~EmbeddedTestServer() override;
 
   // Initializes and waits until the server is ready to accept requests.
   bool InitializeAndWaitUntilReady() WARN_UNUSED_RESULT;
@@ -129,6 +129,12 @@ class EmbeddedTestServer : public StreamListenSocket::Delegate {
   // http://127.0.0.1:<port>/path?query=foo.
   GURL GetURL(const std::string& relative_url) const;
 
+  // Similar to the above method with the difference that it uses the supplied
+  // |hostname| for the URL instead of 127.0.0.1. The hostname should be
+  // resolved to 127.0.0.1.
+  GURL GetURL(const std::string& hostname,
+              const std::string& relative_url) const;
+
   // Returns the port number used by the server.
   int port() const { return port_; }
 
@@ -166,12 +172,12 @@ class EmbeddedTestServer : public StreamListenSocket::Delegate {
                      scoped_ptr<HttpRequest> request);
 
   // StreamListenSocket::Delegate overrides:
-  virtual void DidAccept(StreamListenSocket* server,
-                         scoped_ptr<StreamListenSocket> connection) OVERRIDE;
-  virtual void DidRead(StreamListenSocket* connection,
-                       const char* data,
-                       int length) OVERRIDE;
-  virtual void DidClose(StreamListenSocket* connection) OVERRIDE;
+  void DidAccept(StreamListenSocket* server,
+                 scoped_ptr<StreamListenSocket> connection) override;
+  void DidRead(StreamListenSocket* connection,
+               const char* data,
+               int length) override;
+  void DidClose(StreamListenSocket* connection) override;
 
   HttpConnection* FindConnection(StreamListenSocket* socket);