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

Side by Side Diff: content/browser/loader/upload_data_stream_builder_unittest.cc

Issue 2333923004: Extracting NetLog inner classes into their own classes. (Closed)
Patch Set: Some nit fixes and better, impl-agnostic naming of net_log_parameters_callback_typedef.h -> net/log… Created 4 years, 2 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/loader/upload_data_stream_builder.h" 5 #include "content/browser/loader/upload_data_stream_builder.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <string> 10 #include <string>
11 11
12 #include "base/files/file_path.h" 12 #include "base/files/file_path.h"
13 #include "base/files/file_util.h" 13 #include "base/files/file_util.h"
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "base/run_loop.h" 15 #include "base/run_loop.h"
16 #include "base/threading/thread_task_runner_handle.h" 16 #include "base/threading/thread_task_runner_handle.h"
17 #include "base/time/time.h" 17 #include "base/time/time.h"
18 #include "content/common/resource_request_body_impl.h" 18 #include "content/common/resource_request_body_impl.h"
19 #include "net/base/io_buffer.h" 19 #include "net/base/io_buffer.h"
20 #include "net/base/net_errors.h" 20 #include "net/base/net_errors.h"
21 #include "net/base/test_completion_callback.h" 21 #include "net/base/test_completion_callback.h"
22 #include "net/base/upload_bytes_element_reader.h" 22 #include "net/base/upload_bytes_element_reader.h"
23 #include "net/base/upload_data_stream.h" 23 #include "net/base/upload_data_stream.h"
24 #include "net/base/upload_file_element_reader.h" 24 #include "net/base/upload_file_element_reader.h"
25 #include "net/log/net_log_with_source.h"
25 #include "storage/browser/blob/blob_data_builder.h" 26 #include "storage/browser/blob/blob_data_builder.h"
26 #include "storage/browser/blob/blob_data_handle.h" 27 #include "storage/browser/blob/blob_data_handle.h"
27 #include "storage/browser/blob/blob_storage_context.h" 28 #include "storage/browser/blob/blob_storage_context.h"
28 #include "storage/browser/blob/upload_blob_element_reader.h" 29 #include "storage/browser/blob/upload_blob_element_reader.h"
29 #include "testing/gtest/include/gtest/gtest.h" 30 #include "testing/gtest/include/gtest/gtest.h"
30 #include "url/gurl.h" 31 #include "url/gurl.h"
31 32
32 using storage::BlobDataBuilder; 33 using storage::BlobDataBuilder;
33 using storage::BlobDataHandle; 34 using storage::BlobDataHandle;
34 using storage::BlobStorageContext; 35 using storage::BlobStorageContext;
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 result = 208 result =
208 upload->Read(buffer.get(), buffer->size(), read_callback.callback()); 209 upload->Read(buffer.get(), buffer->size(), read_callback.callback());
209 EXPECT_EQ(kBlobDataLength, read_callback.GetResult(result)); 210 EXPECT_EQ(kBlobDataLength, read_callback.GetResult(result));
210 EXPECT_EQ(0, 211 EXPECT_EQ(0,
211 std::memcmp(kBlobData.c_str(), buffer->data(), buffer->size())); 212 std::memcmp(kBlobData.c_str(), buffer->data(), buffer->size()));
212 } 213 }
213 // Clean up for ASAN. 214 // Clean up for ASAN.
214 base::RunLoop().RunUntilIdle(); 215 base::RunLoop().RunUntilIdle();
215 } 216 }
216 } // namespace content 217 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698