Chromium Code Reviews| Index: components/cronet/ios/test/cronet_http_test.mm |
| diff --git a/components/cronet/ios/test/cronet_http_test.mm b/components/cronet/ios/test/cronet_http_test.mm |
| index 58185081938d23a4a681f663069287eff30f6fb7..2067ff6711ef2a79968a645ab8938ce6491b4993 100644 |
| --- a/components/cronet/ios/test/cronet_http_test.mm |
| +++ b/components/cronet/ios/test/cronet_http_test.mm |
| @@ -21,6 +21,10 @@ |
| #include "url/gurl.h" |
| +@interface Cronet (ExposedForTesting) |
|
mef
2017/04/27 14:58:20
I wonder whether it makes sense to create a header
lilyhoughton
2017/05/01 15:31:35
I like this idea a lot. It probably makes sense a
mef
2017/05/01 19:12:58
sgtm
|
| ++ (void)shutdownForTesting; |
| +@end |
| + |
| @interface TestDelegate : NSObject<NSURLSessionDataDelegate, |
| NSURLSessionDelegate, |
| NSURLSessionTaskDelegate> |
| @@ -140,7 +144,7 @@ class HttpTest : public ::testing::Test { |
| [Cronet setRequestFilterBlock:^(NSURLRequest* request) { |
| return YES; |
| }]; |
| - StartCronetIfNecessary(grpc_support::GetQuicTestServerPort()); |
| + StartCronet(grpc_support::GetQuicTestServerPort()); |
| [Cronet registerHttpProtocolHandler]; |
| NSURLSessionConfiguration* config = |
| [NSURLSessionConfiguration ephemeralSessionConfiguration]; |
| @@ -157,6 +161,9 @@ class HttpTest : public ::testing::Test { |
| void TearDown() override { |
| grpc_support::ShutdownQuicTestServer(); |
| TestServer::Shutdown(); |
| + |
| + [Cronet stopNetLog]; |
| + [Cronet shutdownForTesting]; |
| } |
| // Launches the supplied |task| and blocks until it completes, with a timeout |