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 "net/url_request/url_request_file_job.h" | 5 #include "net/url_request/url_request_file_job.h" |
6 | 6 |
7 #include "base/file_util.h" | 7 #include "base/files/file_util.h" |
8 #include "base/files/scoped_temp_dir.h" | 8 #include "base/files/scoped_temp_dir.h" |
9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
11 #include "base/threading/sequenced_worker_pool.h" | 11 #include "base/threading/sequenced_worker_pool.h" |
12 #include "net/base/filename_util.h" | 12 #include "net/base/filename_util.h" |
13 #include "net/base/net_util.h" | 13 #include "net/base/net_util.h" |
14 #include "net/url_request/url_request_test_util.h" | 14 #include "net/url_request/url_request_test_util.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
16 | 16 |
17 namespace { | 17 namespace { |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 RunRequest(MakeContentOfSize(3 * 1024 * 1024), NULL); | 244 RunRequest(MakeContentOfSize(3 * 1024 * 1024), NULL); |
245 } | 245 } |
246 | 246 |
247 TEST_F(URLRequestFileJobEventsTest, Range) { | 247 TEST_F(URLRequestFileJobEventsTest, Range) { |
248 // Use a 15KB content file and read a range chosen somewhat arbitrarily but | 248 // Use a 15KB content file and read a range chosen somewhat arbitrarily but |
249 // not aligned on any likely page boundaries. | 249 // not aligned on any likely page boundaries. |
250 int size = 15 * 1024; | 250 int size = 15 * 1024; |
251 Range range(1701, (6 * 1024) + 3); | 251 Range range(1701, (6 * 1024) + 3); |
252 RunRequest(MakeContentOfSize(size), &range); | 252 RunRequest(MakeContentOfSize(size), &range); |
253 } | 253 } |
OLD | NEW |