| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #include "chrome/browser/net/resolve_proxy_msg_helper.h" | 5 #include "chrome/browser/net/resolve_proxy_msg_helper.h" |
| 6 | 6 |
| 7 #include "base/waitable_event.h" | 7 #include "base/waitable_event.h" |
| 8 #include "net/base/net_errors.h" | 8 #include "net/base/net_errors.h" |
| 9 #include "net/proxy/mock_proxy_resolver.h" | 9 #include "net/proxy/mock_proxy_resolver.h" |
| 10 #include "net/proxy/proxy_config_service.h" | 10 #include "net/proxy/proxy_config_service.h" |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 EXPECT_EQ(url1, resolver->pending_requests()[0]->url()); | 218 EXPECT_EQ(url1, resolver->pending_requests()[0]->url()); |
| 219 | 219 |
| 220 // Delete the underlying ResolveProxyMsgHelper -- this should cancel all | 220 // Delete the underlying ResolveProxyMsgHelper -- this should cancel all |
| 221 // the requests which are outstanding. | 221 // the requests which are outstanding. |
| 222 helper.reset(); | 222 helper.reset(); |
| 223 | 223 |
| 224 // The pending requests sent to the proxy resolver should have been cancelled. | 224 // The pending requests sent to the proxy resolver should have been cancelled. |
| 225 | 225 |
| 226 EXPECT_EQ(0u, resolver->pending_requests().size()); | 226 EXPECT_EQ(0u, resolver->pending_requests().size()); |
| 227 | 227 |
| 228 EXPECT_TRUE(NULL == delegate.pending_result()); | 228 EXPECT_EQ(NULL, delegate.pending_result()); |
| 229 | 229 |
| 230 // It should also be the case that msg1, msg2, msg3 were deleted by the | 230 // It should also be the case that msg1, msg2, msg3 were deleted by the |
| 231 // cancellation. (Else will show up as a leak in Purify/Valgrind). | 231 // cancellation. (Else will show up as a leak in Purify/Valgrind). |
| 232 } | 232 } |
| OLD | NEW |