OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "net/url_request/url_fetcher_impl.h" | 5 #include "net/url_request/url_fetcher_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 virtual ~ThrottlingTestURLRequestContextGetter() {} | 75 virtual ~ThrottlingTestURLRequestContextGetter() {} |
76 | 76 |
77 TestURLRequestContext* const context_; | 77 TestURLRequestContext* const context_; |
78 }; | 78 }; |
79 | 79 |
80 } // namespace | 80 } // namespace |
81 | 81 |
82 class URLFetcherTest : public testing::Test, | 82 class URLFetcherTest : public testing::Test, |
83 public URLFetcherDelegate { | 83 public URLFetcherDelegate { |
84 public: | 84 public: |
85 URLFetcherTest() | 85 URLFetcherTest() : fetcher_(NULL) {} |
86 : fetcher_(NULL), | |
87 context_(NULL) { | |
88 } | |
89 | 86 |
90 static int GetNumFetcherCores() { | 87 static int GetNumFetcherCores() { |
91 return URLFetcherImpl::GetNumFetcherCores(); | 88 return URLFetcherImpl::GetNumFetcherCores(); |
92 } | 89 } |
93 | 90 |
94 // Creates a URLFetcher, using the program's main thread to do IO. | 91 // Creates a URLFetcher, using the program's main thread to do IO. |
95 virtual void CreateFetcher(const GURL& url); | 92 virtual void CreateFetcher(const GURL& url); |
96 | 93 |
97 // URLFetcherDelegate: | 94 // URLFetcherDelegate: |
98 // Subclasses that override this should either call this function or | 95 // Subclasses that override this should either call this function or |
(...skipping 1424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1523 base::MessageLoop::current()->Run(); // OnURLFetchComplete() will Quit(). | 1520 base::MessageLoop::current()->Run(); // OnURLFetchComplete() will Quit(). |
1524 | 1521 |
1525 base::MessageLoop::current()->RunUntilIdle(); | 1522 base::MessageLoop::current()->RunUntilIdle(); |
1526 ASSERT_FALSE(file_util::PathExists(file_path_)) << file_path_.value() | 1523 ASSERT_FALSE(file_util::PathExists(file_path_)) << file_path_.value() |
1527 << " not removed."; | 1524 << " not removed."; |
1528 } | 1525 } |
1529 | 1526 |
1530 } // namespace | 1527 } // namespace |
1531 | 1528 |
1532 } // namespace net | 1529 } // namespace net |
OLD | NEW |