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

Side by Side Diff: third_party/WebKit/Source/modules/fetch/BytesConsumerTestUtil.h

Issue 2870543002: Removed PassRefPtr to RefPtr copies from unit tests. (Closed)
Patch Set: Created 3 years, 7 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #ifndef BytesConsumerTestUtil_h 5 #ifndef BytesConsumerTestUtil_h
6 #define BytesConsumerTestUtil_h 6 #define BytesConsumerTestUtil_h
7 7
8 #include "modules/fetch/BytesConsumer.h" 8 #include "modules/fetch/BytesConsumer.h"
9 #include "modules/fetch/FetchDataLoader.h" 9 #include "modules/fetch/FetchDataLoader.h"
10 #include "platform/heap/Handle.h" 10 #include "platform/heap/Handle.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 MOCK_METHOD1(DidFetchDataLoadedString, void(const String&)); 62 MOCK_METHOD1(DidFetchDataLoadedString, void(const String&));
63 MOCK_METHOD0(DidFetchDataLoadStream, void()); 63 MOCK_METHOD0(DidFetchDataLoadStream, void());
64 MOCK_METHOD0(DidFetchDataLoadFailed, void()); 64 MOCK_METHOD0(DidFetchDataLoadFailed, void());
65 65
66 void DidFetchDataLoadedArrayBuffer(DOMArrayBuffer* array_buffer) override { 66 void DidFetchDataLoadedArrayBuffer(DOMArrayBuffer* array_buffer) override {
67 DidFetchDataLoadedArrayBufferMock(array_buffer); 67 DidFetchDataLoadedArrayBufferMock(array_buffer);
68 } 68 }
69 // In mock methods we use RefPtr<> rather than PassRefPtr<>. 69 // In mock methods we use RefPtr<> rather than PassRefPtr<>.
70 void DidFetchDataLoadedBlobHandle( 70 void DidFetchDataLoadedBlobHandle(
71 PassRefPtr<BlobDataHandle> blob_data_handle) override { 71 PassRefPtr<BlobDataHandle> blob_data_handle) override {
72 DidFetchDataLoadedBlobHandleMock(blob_data_handle); 72 DidFetchDataLoadedBlobHandleMock(std::move(blob_data_handle));
73 } 73 }
74 }; 74 };
75 75
76 class Command final { 76 class Command final {
77 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); 77 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
78 78
79 public: 79 public:
80 enum Name { 80 enum Name {
81 kData, 81 kData,
82 kDone, 82 kDone,
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 private: 158 private:
159 Member<BytesConsumer> consumer_; 159 Member<BytesConsumer> consumer_;
160 BytesConsumer::Result result_ = BytesConsumer::Result::kShouldWait; 160 BytesConsumer::Result result_ = BytesConsumer::Result::kShouldWait;
161 Vector<char> data_; 161 Vector<char> data_;
162 }; 162 };
163 }; 163 };
164 164
165 } // namespace blink 165 } // namespace blink
166 166
167 #endif // BytesConsumerTestUtil_h 167 #endif // BytesConsumerTestUtil_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698