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

Unified Diff: third_party/WebKit/Source/modules/fetch/BytesConsumerTestUtil.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/BytesConsumerTestUtil.cpp
diff --git a/third_party/WebKit/Source/modules/fetch/BytesConsumerTestUtil.cpp b/third_party/WebKit/Source/modules/fetch/BytesConsumerTestUtil.cpp
index b5099d66596431d42c1d9bd189552af7b7bf7260..8c9e0aa56f35bb5219df55a4295096e8806fe854 100644
--- a/third_party/WebKit/Source/modules/fetch/BytesConsumerTestUtil.cpp
+++ b/third_party/WebKit/Source/modules/fetch/BytesConsumerTestUtil.cpp
@@ -15,6 +15,7 @@ namespace blink {
using Result = BytesConsumer::Result;
using ::testing::_;
+using ::testing::ByMove;
using ::testing::DoAll;
using ::testing::Return;
using ::testing::SetArgPointee;
@@ -25,8 +26,9 @@ BytesConsumerTestUtil::MockBytesConsumer::MockBytesConsumer() {
Return(Result::Error)));
ON_CALL(*this, endRead(_)).WillByDefault(Return(Result::Error));
ON_CALL(*this, getPublicState()).WillByDefault(Return(PublicState::Errored));
- ON_CALL(*this, drainAsBlobDataHandle(_)).WillByDefault(Return(nullptr));
- ON_CALL(*this, drainAsFormData()).WillByDefault(Return(nullptr));
+ ON_CALL(*this, drainAsBlobDataHandle(_))
+ .WillByDefault(Return(ByMove(nullptr)));
+ ON_CALL(*this, drainAsFormData()).WillByDefault(Return(ByMove(nullptr)));
}
BytesConsumerTestUtil::ReplayingBytesConsumer::ReplayingBytesConsumer(

Powered by Google App Engine
This is Rietveld 408576698