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

Unified Diff: webkit/glue/resource_request_body_unittest.cc

Issue 15984016: Call scoped_refptr<T>::get() rather than relying on implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/common/blob/scoped_file.cc ('k') | webkit/plugins/ppapi/host_globals.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/resource_request_body_unittest.cc
diff --git a/webkit/glue/resource_request_body_unittest.cc b/webkit/glue/resource_request_body_unittest.cc
index 3c107fa3a824a964a6f218f796eef252fdc42c50..523b7dcbe466f6fe55d29c88fe77c6f616ce597b 100644
--- a/webkit/glue/resource_request_body_unittest.cc
+++ b/webkit/glue/resource_request_body_unittest.cc
@@ -72,7 +72,7 @@ TEST(ResourceRequestBodyTest, CreateUploadDataStreamWithoutBlob) {
scoped_ptr<net::UploadDataStream> upload(
request_body->ResolveElementsAndCreateUploadDataStream(
- NULL, NULL, base::MessageLoopProxy::current()));
+ NULL, NULL, base::MessageLoopProxy::current().get()));
EXPECT_EQ(kIdentifier, upload->identifier());
ASSERT_EQ(request_body->elements()->size(), upload->element_readers().size());
@@ -144,7 +144,9 @@ TEST(ResourceRequestBodyTest, ResolveBlobAndCreateUploadDataStream) {
scoped_ptr<net::UploadDataStream> upload(
request_body->ResolveElementsAndCreateUploadDataStream(
- &blob_storage_controller, NULL, base::MessageLoopProxy::current()));
+ &blob_storage_controller,
+ NULL,
+ base::MessageLoopProxy::current().get()));
ASSERT_EQ(2U, upload->element_readers().size());
EXPECT_TRUE(AreElementsEqual(*upload->element_readers()[0], upload_element1));
@@ -155,7 +157,7 @@ TEST(ResourceRequestBodyTest, ResolveBlobAndCreateUploadDataStream) {
request_body->AppendBlob(blob_url0);
upload.reset(request_body->ResolveElementsAndCreateUploadDataStream(
- &blob_storage_controller, NULL, base::MessageLoopProxy::current()));
+ &blob_storage_controller, NULL, base::MessageLoopProxy::current().get()));
ASSERT_EQ(0U, upload->element_readers().size());
// Test having only one blob reference.
@@ -163,7 +165,7 @@ TEST(ResourceRequestBodyTest, ResolveBlobAndCreateUploadDataStream) {
request_body->AppendBlob(blob_url1);
upload.reset(request_body->ResolveElementsAndCreateUploadDataStream(
- &blob_storage_controller, NULL, base::MessageLoopProxy::current()));
+ &blob_storage_controller, NULL, base::MessageLoopProxy::current().get()));
ASSERT_EQ(2U, upload->element_readers().size());
EXPECT_TRUE(AreElementsEqual(*upload->element_readers()[0], blob_element1));
EXPECT_TRUE(AreElementsEqual(*upload->element_readers()[1], blob_element2));
@@ -178,7 +180,7 @@ TEST(ResourceRequestBodyTest, ResolveBlobAndCreateUploadDataStream) {
upload_element2.expected_modification_time());
upload.reset(request_body->ResolveElementsAndCreateUploadDataStream(
- &blob_storage_controller, NULL, base::MessageLoopProxy::current()));
+ &blob_storage_controller, NULL, base::MessageLoopProxy::current().get()));
ASSERT_EQ(4U, upload->element_readers().size());
EXPECT_TRUE(AreElementsEqual(*upload->element_readers()[0], blob_element1));
EXPECT_TRUE(AreElementsEqual(*upload->element_readers()[1], blob_element2));
@@ -195,7 +197,7 @@ TEST(ResourceRequestBodyTest, ResolveBlobAndCreateUploadDataStream) {
request_body->AppendBlob(blob_url1);
upload.reset(request_body->ResolveElementsAndCreateUploadDataStream(
- &blob_storage_controller, NULL, base::MessageLoopProxy::current()));
+ &blob_storage_controller, NULL, base::MessageLoopProxy::current().get()));
ASSERT_EQ(4U, upload->element_readers().size());
EXPECT_TRUE(AreElementsEqual(*upload->element_readers()[0], upload_element1));
EXPECT_TRUE(AreElementsEqual(*upload->element_readers()[1], upload_element2));
@@ -212,7 +214,7 @@ TEST(ResourceRequestBodyTest, ResolveBlobAndCreateUploadDataStream) {
upload_element2.expected_modification_time());
upload.reset(request_body->ResolveElementsAndCreateUploadDataStream(
- &blob_storage_controller, NULL, base::MessageLoopProxy::current()));
+ &blob_storage_controller, NULL, base::MessageLoopProxy::current().get()));
ASSERT_EQ(4U, upload->element_readers().size());
EXPECT_TRUE(AreElementsEqual(*upload->element_readers()[0], upload_element1));
EXPECT_TRUE(AreElementsEqual(*upload->element_readers()[1], blob_element1));
@@ -231,7 +233,7 @@ TEST(ResourceRequestBodyTest, ResolveBlobAndCreateUploadDataStream) {
upload_element2.expected_modification_time());
upload.reset(request_body->ResolveElementsAndCreateUploadDataStream(
- &blob_storage_controller, NULL, base::MessageLoopProxy::current()));
+ &blob_storage_controller, NULL, base::MessageLoopProxy::current().get()));
ASSERT_EQ(8U, upload->element_readers().size());
EXPECT_TRUE(AreElementsEqual(*upload->element_readers()[0], blob_element1));
EXPECT_TRUE(AreElementsEqual(*upload->element_readers()[1], blob_element2));
« no previous file with comments | « webkit/common/blob/scoped_file.cc ('k') | webkit/plugins/ppapi/host_globals.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698