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

Side by Side Diff: webkit/glue/resource_request_body_unittest.cc

Issue 16155009: Update webkit/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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
« no previous file with comments | « webkit/dom_storage/dom_storage_session.cc ('k') | webkit/glue/webkitplatformsupport_impl.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "webkit/glue/resource_request_body.h" 5 #include "webkit/glue/resource_request_body.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"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 base::MessageLoop message_loop; 95 base::MessageLoop message_loop;
96 // Setup blob data for testing. 96 // Setup blob data for testing.
97 base::Time time1, time2; 97 base::Time time1, time2;
98 base::Time::FromString("Tue, 15 Nov 1994, 12:45:26 GMT", &time1); 98 base::Time::FromString("Tue, 15 Nov 1994, 12:45:26 GMT", &time1);
99 base::Time::FromString("Mon, 14 Nov 1994, 11:30:49 GMT", &time2); 99 base::Time::FromString("Mon, 14 Nov 1994, 11:30:49 GMT", &time2);
100 100
101 BlobStorageController blob_storage_controller; 101 BlobStorageController blob_storage_controller;
102 scoped_refptr<BlobData> blob_data(new BlobData()); 102 scoped_refptr<BlobData> blob_data(new BlobData());
103 103
104 GURL blob_url0("blob://url_0"); 104 GURL blob_url0("blob://url_0");
105 blob_storage_controller.AddFinishedBlob(blob_url0, blob_data); 105 blob_storage_controller.AddFinishedBlob(blob_url0, blob_data.get());
106 106
107 blob_data->AppendData("BlobData"); 107 blob_data->AppendData("BlobData");
108 blob_data->AppendFile( 108 blob_data->AppendFile(
109 base::FilePath(FILE_PATH_LITERAL("BlobFile.txt")), 0, 20, time1); 109 base::FilePath(FILE_PATH_LITERAL("BlobFile.txt")), 0, 20, time1);
110 110
111 GURL blob_url1("blob://url_1"); 111 GURL blob_url1("blob://url_1");
112 blob_storage_controller.AddFinishedBlob(blob_url1, blob_data); 112 blob_storage_controller.AddFinishedBlob(blob_url1, blob_data.get());
113 113
114 GURL blob_url2("blob://url_2"); 114 GURL blob_url2("blob://url_2");
115 blob_storage_controller.CloneBlob(blob_url2, blob_url1); 115 blob_storage_controller.CloneBlob(blob_url2, blob_url1);
116 116
117 GURL blob_url3("blob://url_3"); 117 GURL blob_url3("blob://url_3");
118 blob_storage_controller.CloneBlob(blob_url3, blob_url2); 118 blob_storage_controller.CloneBlob(blob_url3, blob_url2);
119 119
120 // Setup upload data elements for comparison. 120 // Setup upload data elements for comparison.
121 ResourceRequestBody::Element blob_element1, blob_element2; 121 ResourceRequestBody::Element blob_element1, blob_element2;
122 blob_element1.SetToBytes( 122 blob_element1.SetToBytes(
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 EXPECT_TRUE(AreElementsEqual(*upload->element_readers()[1], blob_element2)); 237 EXPECT_TRUE(AreElementsEqual(*upload->element_readers()[1], blob_element2));
238 EXPECT_TRUE(AreElementsEqual(*upload->element_readers()[2], upload_element1)); 238 EXPECT_TRUE(AreElementsEqual(*upload->element_readers()[2], upload_element1));
239 EXPECT_TRUE(AreElementsEqual(*upload->element_readers()[3], blob_element1)); 239 EXPECT_TRUE(AreElementsEqual(*upload->element_readers()[3], blob_element1));
240 EXPECT_TRUE(AreElementsEqual(*upload->element_readers()[4], blob_element2)); 240 EXPECT_TRUE(AreElementsEqual(*upload->element_readers()[4], blob_element2));
241 EXPECT_TRUE(AreElementsEqual(*upload->element_readers()[5], blob_element1)); 241 EXPECT_TRUE(AreElementsEqual(*upload->element_readers()[5], blob_element1));
242 EXPECT_TRUE(AreElementsEqual(*upload->element_readers()[6], blob_element2)); 242 EXPECT_TRUE(AreElementsEqual(*upload->element_readers()[6], blob_element2));
243 EXPECT_TRUE(AreElementsEqual(*upload->element_readers()[7], upload_element2)); 243 EXPECT_TRUE(AreElementsEqual(*upload->element_readers()[7], upload_element2));
244 } 244 }
245 245
246 } // namespace webkit_glue 246 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/dom_storage/dom_storage_session.cc ('k') | webkit/glue/webkitplatformsupport_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698