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

Unified Diff: third_party/WebKit/Source/modules/fetch/FetchDataLoaderTest.cpp

Issue 2432883002: Replaced PassRefPtr copies with moves in unit tests. (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/fetch/FetchDataLoaderTest.cpp
diff --git a/third_party/WebKit/Source/modules/fetch/FetchDataLoaderTest.cpp b/third_party/WebKit/Source/modules/fetch/FetchDataLoaderTest.cpp
index e6e2ef88d7c69692ab946b544e636f08aeb02ad1..ea13c9fab03ce2d04e052138b7754d719a50428d 100644
--- a/third_party/WebKit/Source/modules/fetch/FetchDataLoaderTest.cpp
+++ b/third_party/WebKit/Source/modules/fetch/FetchDataLoaderTest.cpp
@@ -48,7 +48,7 @@ TEST(FetchDataLoaderTest, LoadAsBlob) {
EXPECT_CALL(*consumer,
drainAsBlobDataHandle(
BytesConsumer::BlobSizePolicy::DisallowBlobWithInvalidSize))
- .WillOnce(Return(nullptr));
+ .WillOnce(Return(ByMove(nullptr)));
EXPECT_CALL(*consumer, setClient(_)).WillOnce(SaveArg<0>(&client));
EXPECT_CALL(*consumer, beginRead(_, _))
.WillOnce(DoAll(SetArgPointee<0>(nullptr), SetArgPointee<1>(0),
@@ -96,7 +96,7 @@ TEST(FetchDataLoaderTest, LoadAsBlobFailed) {
EXPECT_CALL(*consumer,
drainAsBlobDataHandle(
BytesConsumer::BlobSizePolicy::DisallowBlobWithInvalidSize))
- .WillOnce(Return(nullptr));
+ .WillOnce(Return(ByMove(nullptr)));
EXPECT_CALL(*consumer, setClient(_)).WillOnce(SaveArg<0>(&client));
EXPECT_CALL(*consumer, beginRead(_, _))
.WillOnce(DoAll(SetArgPointee<0>(nullptr), SetArgPointee<1>(0),
@@ -139,7 +139,7 @@ TEST(FetchDataLoaderTest, LoadAsBlobCancel) {
EXPECT_CALL(*consumer,
drainAsBlobDataHandle(
BytesConsumer::BlobSizePolicy::DisallowBlobWithInvalidSize))
- .WillOnce(Return(nullptr));
+ .WillOnce(Return(ByMove(nullptr)));
EXPECT_CALL(*consumer, setClient(_)).WillOnce(SaveArg<0>(&client));
EXPECT_CALL(*consumer, beginRead(_, _))
.WillOnce(DoAll(SetArgPointee<0>(nullptr), SetArgPointee<1>(0),
@@ -178,7 +178,7 @@ TEST(FetchDataLoaderTest,
EXPECT_CALL(*consumer,
drainAsBlobDataHandle(
BytesConsumer::BlobSizePolicy::DisallowBlobWithInvalidSize))
- .WillOnce(Return(inputBlobDataHandle));
+ .WillOnce(Return(ByMove(inputBlobDataHandle)));
EXPECT_CALL(*fetchDataLoaderClient, didFetchDataLoadedBlobHandleMock(_))
.WillOnce(SaveArg<0>(&blobDataHandle));
EXPECT_CALL(checkpoint, Call(2));
@@ -220,7 +220,7 @@ TEST(FetchDataLoaderTest,
EXPECT_CALL(*consumer,
drainAsBlobDataHandle(
BytesConsumer::BlobSizePolicy::DisallowBlobWithInvalidSize))
- .WillOnce(Return(inputBlobDataHandle));
+ .WillOnce(Return(ByMove(inputBlobDataHandle)));
EXPECT_CALL(*fetchDataLoaderClient, didFetchDataLoadedBlobHandleMock(_))
.WillOnce(SaveArg<0>(&blobDataHandle));
EXPECT_CALL(checkpoint, Call(2));

Powered by Google App Engine
This is Rietveld 408576698