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

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

Issue 442383002: Move storage-related files from webkit/ to new top-level directory storage/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 4 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 | Annotate | Revision Log
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 <algorithm> 7 #include <algorithm>
8 8
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
11 #include "base/message_loop/message_loop.h" 11 #include "base/message_loop/message_loop.h"
12 #include "base/message_loop/message_loop_proxy.h" 12 #include "base/message_loop/message_loop_proxy.h"
13 #include "base/run_loop.h" 13 #include "base/run_loop.h"
14 #include "base/time/time.h" 14 #include "base/time/time.h"
15 #include "content/common/resource_request_body.h" 15 #include "content/common/resource_request_body.h"
16 #include "net/base/upload_bytes_element_reader.h" 16 #include "net/base/upload_bytes_element_reader.h"
17 #include "net/base/upload_data_stream.h" 17 #include "net/base/upload_data_stream.h"
18 #include "net/base/upload_file_element_reader.h" 18 #include "net/base/upload_file_element_reader.h"
19 #include "testing/gtest/include/gtest/gtest.h" 19 #include "testing/gtest/include/gtest/gtest.h"
20 #include "url/gurl.h" 20 #include "url/gurl.h"
21 #include "webkit/browser/blob/blob_storage_context.h" 21 #include "storage/browser/blob/blob_storage_context.h"
22 22
23 using webkit_blob::BlobData; 23 using storage::BlobData;
24 using webkit_blob::BlobDataHandle; 24 using storage::BlobDataHandle;
25 using webkit_blob::BlobStorageContext; 25 using storage::BlobStorageContext;
26 26
27 namespace content { 27 namespace content {
28 namespace { 28 namespace {
29 29
30 bool AreElementsEqual(const net::UploadElementReader& reader, 30 bool AreElementsEqual(const net::UploadElementReader& reader,
31 const ResourceRequestBody::Element& element) { 31 const ResourceRequestBody::Element& element) {
32 switch(element.type()) { 32 switch(element.type()) {
33 case ResourceRequestBody::Element::TYPE_BYTES: { 33 case ResourceRequestBody::Element::TYPE_BYTES: {
34 const net::UploadBytesElementReader* bytes_reader = 34 const net::UploadBytesElementReader* bytes_reader =
35 reader.AsBytesReader(); 35 reader.AsBytesReader();
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 EXPECT_TRUE(AreElementsEqual( 298 EXPECT_TRUE(AreElementsEqual(
299 *upload->element_readers()[6], blob_element2)); 299 *upload->element_readers()[6], blob_element2));
300 EXPECT_TRUE(AreElementsEqual( 300 EXPECT_TRUE(AreElementsEqual(
301 *upload->element_readers()[7], upload_element2)); 301 *upload->element_readers()[7], upload_element2));
302 } 302 }
303 // Clean up for ASAN. 303 // Clean up for ASAN.
304 base::RunLoop().RunUntilIdle(); 304 base::RunLoop().RunUntilIdle();
305 } 305 }
306 306
307 } // namespace content 307 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/upload_data_stream_builder.cc ('k') | content/browser/media/android/browser_media_player_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698