| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "content/browser/renderer_host/resource_dispatcher_host.h" | 5 #include "content/browser/renderer_host/resource_dispatcher_host.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 #include "content/public/common/resource_response.h" | 27 #include "content/public/common/resource_response.h" |
| 28 #include "net/base/net_errors.h" | 28 #include "net/base/net_errors.h" |
| 29 #include "net/base/upload_data.h" | 29 #include "net/base/upload_data.h" |
| 30 #include "net/http/http_util.h" | 30 #include "net/http/http_util.h" |
| 31 #include "net/url_request/url_request.h" | 31 #include "net/url_request/url_request.h" |
| 32 #include "net/url_request/url_request_job.h" | 32 #include "net/url_request/url_request_job.h" |
| 33 #include "net/url_request/url_request_test_job.h" | 33 #include "net/url_request/url_request_test_job.h" |
| 34 #include "testing/gtest/include/gtest/gtest.h" | 34 #include "testing/gtest/include/gtest/gtest.h" |
| 35 #include "webkit/appcache/appcache_interfaces.h" | 35 #include "webkit/appcache/appcache_interfaces.h" |
| 36 | 36 |
| 37 namespace content { |
| 38 class DownloadManager; |
| 39 } // namespace content |
| 40 |
| 37 using content::BrowserThread; | 41 using content::BrowserThread; |
| 38 using content::BrowserThreadImpl; | 42 using content::BrowserThreadImpl; |
| 39 using content::ChildProcessHostImpl; | 43 using content::ChildProcessHostImpl; |
| 40 using content::DownloadManager; | 44 using content::DownloadManager; |
| 41 | 45 |
| 42 // TODO(eroman): Write unit tests for SafeBrowsing that exercise | 46 // TODO(eroman): Write unit tests for SafeBrowsing that exercise |
| 43 // SafeBrowsingResourceHandler. | 47 // SafeBrowsingResourceHandler. |
| 44 | 48 |
| 45 namespace { | 49 namespace { |
| 46 | 50 |
| (...skipping 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1229 EXPECT_EQ(1, host_.pending_requests()); | 1233 EXPECT_EQ(1, host_.pending_requests()); |
| 1230 | 1234 |
| 1231 // Cancelling by other methods shouldn't work either. | 1235 // Cancelling by other methods shouldn't work either. |
| 1232 host_.CancelRequestsForProcess(render_view_id); | 1236 host_.CancelRequestsForProcess(render_view_id); |
| 1233 EXPECT_EQ(1, host_.pending_requests()); | 1237 EXPECT_EQ(1, host_.pending_requests()); |
| 1234 | 1238 |
| 1235 // Cancelling by context should work. | 1239 // Cancelling by context should work. |
| 1236 host_.CancelRequestsForContext(&filter_->resource_context()); | 1240 host_.CancelRequestsForContext(&filter_->resource_context()); |
| 1237 EXPECT_EQ(0, host_.pending_requests()); | 1241 EXPECT_EQ(0, host_.pending_requests()); |
| 1238 } | 1242 } |
| OLD | NEW |