OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/android/url_request_content_job.h" | 5 #include "content/browser/android/url_request_content_job.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <memory> | 10 #include <memory> |
11 | 11 |
12 #include "base/files/file_util.h" | 12 #include "base/files/file_util.h" |
13 #include "base/message_loop/message_loop.h" | 13 #include "base/message_loop/message_loop.h" |
14 #include "base/run_loop.h" | 14 #include "base/run_loop.h" |
15 #include "base/strings/stringprintf.h" | 15 #include "base/strings/stringprintf.h" |
16 #include "base/test/test_file_util.h" | 16 #include "base/test/test_file_util.h" |
17 #include "base/threading/thread_task_runner_handle.h" | 17 #include "base/threading/thread_task_runner_handle.h" |
18 #include "net/url_request/url_request.h" | 18 #include "net/url_request/url_request.h" |
19 #include "net/url_request/url_request_test_util.h" | 19 #include "net/url_request/url_request_test_util.h" |
20 #include "testing/gtest/include/gtest/gtest.h" | 20 #include "testing/gtest/include/gtest/gtest.h" |
21 | 21 |
| 22 |
22 namespace content { | 23 namespace content { |
23 | 24 |
24 namespace { | 25 namespace { |
25 | 26 |
26 // A URLRequestJobFactory that will return URLRequestContentJobWithCallbacks | 27 // A URLRequestJobFactory that will return URLRequestContentJobWithCallbacks |
27 // instances for content:// scheme URLs. | 28 // instances for content:// scheme URLs. |
28 class CallbacksJobFactory : public net::URLRequestJobFactory { | 29 class CallbacksJobFactory : public net::URLRequestJobFactory { |
29 public: | 30 public: |
30 class JobObserver { | 31 class JobObserver { |
31 public: | 32 public: |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 } | 190 } |
190 | 191 |
191 TEST_F(URLRequestContentJobTest, ContentURIWithZeroRange) { | 192 TEST_F(URLRequestContentJobTest, ContentURIWithZeroRange) { |
192 Range range(0, 0); | 193 Range range(0, 0); |
193 RunRequest(&range); | 194 RunRequest(&range); |
194 } | 195 } |
195 | 196 |
196 } // namespace | 197 } // namespace |
197 | 198 |
198 } // namespace content | 199 } // namespace content |
OLD | NEW |