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

Side by Side Diff: content/browser/download/mock_download_file.cc

Issue 2742093002: Glue parallel download job and download file together. (Closed)
Patch Set: Work on feedback. Created 3 years, 9 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 (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 "content/browser/download/mock_download_file.h" 5 #include "content/browser/download/mock_download_file.h"
6 #include "testing/gmock/include/gmock/gmock.h" 6 #include "testing/gmock/include/gmock/gmock.h"
7 7
8 using ::testing::_; 8 using ::testing::_;
9 using ::testing::Return; 9 using ::testing::Return;
10 10
(...skipping 11 matching lines...) Expand all
22 // construction. 22 // construction.
23 ON_CALL(*this, Initialize(_)) 23 ON_CALL(*this, Initialize(_))
24 .WillByDefault(::testing::Invoke(SuccessRun)); 24 .WillByDefault(::testing::Invoke(SuccessRun));
25 } 25 }
26 26
27 MockDownloadFile::~MockDownloadFile() { 27 MockDownloadFile::~MockDownloadFile() {
28 } 28 }
29 29
30 void MockDownloadFile::AddByteStream( 30 void MockDownloadFile::AddByteStream(
31 std::unique_ptr<ByteStreamReader> stream_reader, 31 std::unique_ptr<ByteStreamReader> stream_reader,
32 int64_t offset) { 32 int64_t offset,
33 int64_t length) {
33 // Gmock currently can't mock method that takes move-only parameters, 34 // Gmock currently can't mock method that takes move-only parameters,
34 // delegate the EXPECT_CALL count to |DoAddByteStream|. 35 // delegate the EXPECT_CALL count to |DoAddByteStream|.
35 DoAddByteStream(stream_reader.get(), offset); 36 DoAddByteStream(stream_reader.get(), offset, length);
36 } 37 }
37 38
38 } // namespace content 39 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698