OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef COMPONENTS_CRONET_IOS_TEST_TEST_SERVER_H_ | 5 #ifndef COMPONENTS_CRONET_IOS_TEST_TEST_SERVER_H_ |
6 #define COMPONENTS_CRONET_IOS_TEST_TEST_SERVER_H_ | 6 #define COMPONENTS_CRONET_IOS_TEST_TEST_SERVER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 namespace cronet { | 10 namespace cronet { |
11 | 11 |
12 class TestServer { | 12 class TestServer { |
13 public: | 13 public: |
14 static bool Start(); | 14 static bool Start(); |
15 static void Shutdown(); | 15 static void Shutdown(); |
16 | 16 |
17 // Returns URL which respond with echo of header with |header_name| in | 17 // Returns URL which respond with echo of header with |header_name| in |
18 // response body. | 18 // response body. |
19 static std::string GetEchoHeaderURL(const std::string& header_name); | 19 static std::string GetEchoHeaderURL(const std::string& header_name); |
20 // Returns URL which respond with setting cookie to |cookie_line| and echo it | 20 // Returns URL which respond with setting cookie to |cookie_line| and echo it |
21 // in response body. | 21 // in response body. |
22 static std::string GetSetCookieURL(const std::string& cookie_line); | 22 static std::string GetSetCookieURL(const std::string& cookie_line); |
| 23 // Returns URL which respond with |data_size| of bytes in response body. |
| 24 static std::string GetBigDataURL(long data_size); |
23 }; | 25 }; |
24 | 26 |
25 } // namespace cronet | 27 } // namespace cronet |
26 | 28 |
27 #endif // COMPONENTS_CRONET_IOS_TEST_TEST_SERVER_H_ | 29 #endif // COMPONENTS_CRONET_IOS_TEST_TEST_SERVER_H_ |
OLD | NEW |