Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Side by Side Diff: storage/browser/blob/blob_reader_unittest.cc

Issue 2815743002: Move a couple of blob tests next to the files they cover. (Closed)
Patch Set: Fix gn check, take 2. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « storage/browser/BUILD.gn ('k') | storage/browser/blob/blob_url_request_job_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 #include <string.h> 7 #include <string.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
11 11
12 #include "base/bind.h" 12 #include "base/bind.h"
13 #include "base/bind_helpers.h" 13 #include "base/bind_helpers.h"
14 #include "base/callback.h" 14 #include "base/callback.h"
15 #include "base/files/file_path.h" 15 #include "base/files/file_path.h"
16 #include "base/location.h" 16 #include "base/location.h"
17 #include "base/macros.h" 17 #include "base/macros.h"
18 #include "base/memory/ptr_util.h" 18 #include "base/memory/ptr_util.h"
19 #include "base/message_loop/message_loop.h" 19 #include "base/message_loop/message_loop.h"
20 #include "base/run_loop.h" 20 #include "base/run_loop.h"
21 #include "base/strings/stringprintf.h" 21 #include "base/strings/stringprintf.h"
22 #include "base/task_runner.h" 22 #include "base/task_runner.h"
23 #include "base/time/time.h" 23 #include "base/time/time.h"
24 #include "content/public/test/async_file_test_helper.h"
25 #include "content/public/test/test_file_system_context.h"
26 #include "net/base/completion_callback.h" 24 #include "net/base/completion_callback.h"
27 #include "net/base/io_buffer.h" 25 #include "net/base/io_buffer.h"
28 #include "net/base/net_errors.h" 26 #include "net/base/net_errors.h"
29 #include "net/base/test_completion_callback.h" 27 #include "net/base/test_completion_callback.h"
30 #include "net/disk_cache/disk_cache.h" 28 #include "net/disk_cache/disk_cache.h"
31 #include "storage/browser/blob/blob_data_builder.h" 29 #include "storage/browser/blob/blob_data_builder.h"
32 #include "storage/browser/blob/blob_data_handle.h" 30 #include "storage/browser/blob/blob_data_handle.h"
33 #include "storage/browser/blob/blob_reader.h" 31 #include "storage/browser/blob/blob_reader.h"
34 #include "storage/browser/blob/blob_storage_context.h" 32 #include "storage/browser/blob/blob_storage_context.h"
35 #include "storage/browser/fileapi/file_stream_reader.h" 33 #include "storage/browser/fileapi/file_stream_reader.h"
36 #include "storage/browser/fileapi/file_system_context.h" 34 #include "storage/browser/fileapi/file_system_context.h"
37 #include "storage/browser/fileapi/file_system_file_util.h" 35 #include "storage/browser/fileapi/file_system_file_util.h"
36 #include "storage/browser/test/async_file_test_helper.h"
37 #include "storage/browser/test/test_file_system_context.h"
38 #include "testing/gmock/include/gmock/gmock.h" 38 #include "testing/gmock/include/gmock/gmock.h"
39 #include "testing/gtest/include/gtest/gtest.h" 39 #include "testing/gtest/include/gtest/gtest.h"
40 #include "url/gurl.h" 40 #include "url/gurl.h"
41 41
42 using base::FilePath; 42 using base::FilePath;
43 using content::AsyncFileTestHelper; 43 using content::AsyncFileTestHelper;
44 using net::DrainableIOBuffer; 44 using net::DrainableIOBuffer;
45 using net::IOBuffer; 45 using net::IOBuffer;
46 using FileCreationInfo = storage::BlobMemoryController::FileCreationInfo; 46 using FileCreationInfo = storage::BlobMemoryController::FileCreationInfo;
47 47
(...skipping 1192 matching lines...) Expand 10 before | Expand all | Expand 10 after
1240 reader_->Read(buffer.get(), kDataSize, &bytes_read, 1240 reader_->Read(buffer.get(), kDataSize, &bytes_read,
1241 base::Bind(&SetValue<int>, &async_bytes_read))); 1241 base::Bind(&SetValue<int>, &async_bytes_read)));
1242 EXPECT_EQ(net::OK, reader_->net_error()); 1242 EXPECT_EQ(net::OK, reader_->net_error());
1243 EXPECT_EQ(kDataSize, static_cast<size_t>(bytes_read)); 1243 EXPECT_EQ(kDataSize, static_cast<size_t>(bytes_read));
1244 EXPECT_EQ(0, async_bytes_read); 1244 EXPECT_EQ(0, async_bytes_read);
1245 EXPECT_EQ(kData, std::string(buffer->data(), kDataSize)); 1245 EXPECT_EQ(kData, std::string(buffer->data(), kDataSize));
1246 EXPECT_EQ(net::OK, size_result); 1246 EXPECT_EQ(net::OK, size_result);
1247 } 1247 }
1248 1248
1249 } // namespace storage 1249 } // namespace storage
OLDNEW
« no previous file with comments | « storage/browser/BUILD.gn ('k') | storage/browser/blob/blob_url_request_job_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698