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

Side by Side Diff: media/filters/ffmpeg_glue_unittest.cc

Issue 8352019: Change Read size to a size_t for clarity (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/filters/ffmpeg_glue.h ('k') | media/filters/in_memory_url_protocol.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 "base/logging.h" 5 #include "base/logging.h"
6 #include "base/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "media/base/mock_filters.h" 7 #include "media/base/mock_filters.h"
8 #include "media/ffmpeg/ffmpeg_common.h" 8 #include "media/ffmpeg/ffmpeg_common.h"
9 #include "media/filters/ffmpeg_glue.h" 9 #include "media/filters/ffmpeg_glue.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 11
12 using ::testing::_; 12 using ::testing::_;
13 using ::testing::DoAll; 13 using ::testing::DoAll;
14 using ::testing::InSequence; 14 using ::testing::InSequence;
15 using ::testing::Return; 15 using ::testing::Return;
16 using ::testing::SetArgumentPointee; 16 using ::testing::SetArgumentPointee;
17 using ::testing::StrictMock; 17 using ::testing::StrictMock;
18 18
19 namespace media { 19 namespace media {
20 20
21 class MockProtocol : public FFmpegURLProtocol { 21 class MockProtocol : public FFmpegURLProtocol {
22 public: 22 public:
23 MockProtocol() { 23 MockProtocol() {
24 } 24 }
25 25
26 MOCK_METHOD2(Read, int(int size, uint8* data)); 26 MOCK_METHOD2(Read, size_t(size_t size, uint8* data));
27 MOCK_METHOD1(GetPosition, bool(int64* position_out)); 27 MOCK_METHOD1(GetPosition, bool(int64* position_out));
28 MOCK_METHOD1(SetPosition, bool(int64 position)); 28 MOCK_METHOD1(SetPosition, bool(int64 position));
29 MOCK_METHOD1(GetSize, bool(int64* size_out)); 29 MOCK_METHOD1(GetSize, bool(int64* size_out));
30 MOCK_METHOD0(IsStreaming, bool()); 30 MOCK_METHOD0(IsStreaming, bool());
31 31
32 private: 32 private:
33 DISALLOW_COPY_AND_ASSIGN(MockProtocol); 33 DISALLOW_COPY_AND_ASSIGN(MockProtocol);
34 }; 34 };
35 35
36 class FFmpegGlueTest : public ::testing::Test { 36 class FFmpegGlueTest : public ::testing::Test {
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 314
315 // Remove our own reference, we shouldn't be destroyed yet. 315 // Remove our own reference, we shouldn't be destroyed yet.
316 CheckPoint(0); 316 CheckPoint(0);
317 protocol.reset(); 317 protocol.reset();
318 318
319 // ~FFmpegGlue() will be called when this unit test finishes execution. By 319 // ~FFmpegGlue() will be called when this unit test finishes execution. By
320 // leaving something inside FFmpegGlue's map we get to test our cleanup code. 320 // leaving something inside FFmpegGlue's map we get to test our cleanup code.
321 } 321 }
322 322
323 } // namespace media 323 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/ffmpeg_glue.h ('k') | media/filters/in_memory_url_protocol.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698