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

Side by Side Diff: media/base/mock_callback.cc

Issue 6686061: PipelineError is dead. Long live PipelineStatus! (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: responses to 2nd CR Created 9 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 | Annotate | Revision Log
« no previous file with comments | « media/base/mock_callback.h ('k') | media/base/mock_filter_host.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "media/base/mock_callback.h" 5 #include "media/base/mock_callback.h"
6 6
7 using ::testing::_; 7 using ::testing::_;
8 using ::testing::StrictMock; 8 using ::testing::StrictMock;
9 9
10 namespace media { 10 namespace media {
(...skipping 10 matching lines...) Expand all
21 } 21 }
22 22
23 MockStatusCallback::MockStatusCallback() {} 23 MockStatusCallback::MockStatusCallback() {}
24 24
25 MockStatusCallback::~MockStatusCallback() { 25 MockStatusCallback::~MockStatusCallback() {
26 Destructor(); 26 Destructor();
27 } 27 }
28 28
29 // Required by GMock to allow the RunWithParams() expectation 29 // Required by GMock to allow the RunWithParams() expectation
30 // in ExpectRunAndDelete() to compile. 30 // in ExpectRunAndDelete() to compile.
31 bool operator==(const Tuple1<PipelineError>& lhs, 31 bool operator==(const Tuple1<PipelineStatus>& lhs,
32 const Tuple1<PipelineError>& rhs) { 32 const Tuple1<PipelineStatus>& rhs) {
33 return lhs.a == rhs.a; 33 return lhs.a == rhs.a;
34 } 34 }
35 35
36 void MockStatusCallback::ExpectRunAndDelete(PipelineError error) { 36 void MockStatusCallback::ExpectRunAndDelete(PipelineStatus status) {
37 EXPECT_CALL(*this, RunWithParams(Tuple1<PipelineError>(error))); 37 EXPECT_CALL(*this, RunWithParams(Tuple1<PipelineStatus>(status)));
38 EXPECT_CALL(*this, Destructor()); 38 EXPECT_CALL(*this, Destructor());
39 } 39 }
40 40
41 MockCallback* NewExpectedCallback() { 41 MockCallback* NewExpectedCallback() {
42 StrictMock<MockCallback>* callback = new StrictMock<MockCallback>(); 42 StrictMock<MockCallback>* callback = new StrictMock<MockCallback>();
43 callback->ExpectRunAndDelete(); 43 callback->ExpectRunAndDelete();
44 return callback; 44 return callback;
45 } 45 }
46 46
47 MockStatusCallback* NewExpectedStatusCallback(PipelineError error) { 47 MockStatusCallback* NewExpectedStatusCallback(PipelineStatus status) {
48 StrictMock<MockStatusCallback>* callback = 48 StrictMock<MockStatusCallback>* callback =
49 new StrictMock<MockStatusCallback>(); 49 new StrictMock<MockStatusCallback>();
50 callback->ExpectRunAndDelete(error); 50 callback->ExpectRunAndDelete(status);
51 return callback; 51 return callback;
52 } 52 }
53 53
54 } // namespace media 54 } // namespace media
OLDNEW
« no previous file with comments | « media/base/mock_callback.h ('k') | media/base/mock_filter_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698