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

Unified Diff: media/filters/ffmpeg_glue_unittest.cc

Issue 6993042: ffmpeg chromium glue (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: once more new test_expectations.txt Created 9 years, 6 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
« no previous file with comments | « media/filters/ffmpeg_glue.cc ('k') | media/test/ffmpeg_tests/ffmpeg_tests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/ffmpeg_glue_unittest.cc
===================================================================
--- media/filters/ffmpeg_glue_unittest.cc (revision 91170)
+++ media/filters/ffmpeg_glue_unittest.cc (working copy)
@@ -150,7 +150,7 @@
memset(&context, 0, sizeof(context));
// Test opening a URLContext with a protocol that doesn't exist.
- EXPECT_EQ(AVERROR_IO, protocol_->url_open(&context, "foobar", 0));
+ EXPECT_EQ(AVERROR(EIO), protocol_->url_open(&context, "foobar", 0));
// Test opening a URLContext with our protocol.
EXPECT_EQ(0, protocol_->url_open(&context, key.c_str(), 0));
@@ -190,9 +190,9 @@
uint8 buffer[kBufferSize];
// Writing should always fail and never call the protocol.
- EXPECT_EQ(AVERROR_IO, protocol_->url_write(&context, NULL, 0));
- EXPECT_EQ(AVERROR_IO, protocol_->url_write(&context, buffer, 0));
- EXPECT_EQ(AVERROR_IO, protocol_->url_write(&context, buffer, kBufferSize));
+ EXPECT_EQ(AVERROR(EIO), protocol_->url_write(&context, NULL, 0));
+ EXPECT_EQ(AVERROR(EIO), protocol_->url_write(&context, buffer, 0));
+ EXPECT_EQ(AVERROR(EIO), protocol_->url_write(&context, buffer, kBufferSize));
// Destroy the protocol.
protocol_->url_close(&context);
@@ -218,7 +218,7 @@
EXPECT_EQ(0, protocol_->url_read(&context, buffer, 0));
EXPECT_EQ(kBufferSize, protocol_->url_read(&context, buffer, kBufferSize));
- EXPECT_EQ(AVERROR_IO, protocol_->url_read(&context, buffer, kBufferSize));
+ EXPECT_EQ(AVERROR(EIO), protocol_->url_read(&context, buffer, kBufferSize));
// Destroy the protocol.
protocol_->url_close(&context);
@@ -241,7 +241,7 @@
EXPECT_CALL(*protocol, GetPosition(_))
.WillOnce(DoAll(SetArgumentPointee<0>(8), Return(true)));
- EXPECT_EQ(AVERROR_IO, protocol_->url_seek(&context, -16, SEEK_SET));
+ EXPECT_EQ(AVERROR(EIO), protocol_->url_seek(&context, -16, SEEK_SET));
EXPECT_EQ(8, protocol_->url_seek(&context, 16, SEEK_SET));
// SEEK_CUR should call GetPosition() first, and if it succeeds add the offset
@@ -261,8 +261,8 @@
EXPECT_CALL(*protocol, GetPosition(_))
.WillOnce(DoAll(SetArgumentPointee<0>(16), Return(true)));
- EXPECT_EQ(AVERROR_IO, protocol_->url_seek(&context, 8, SEEK_CUR));
- EXPECT_EQ(AVERROR_IO, protocol_->url_seek(&context, 8, SEEK_CUR));
+ EXPECT_EQ(AVERROR(EIO), protocol_->url_seek(&context, 8, SEEK_CUR));
+ EXPECT_EQ(AVERROR(EIO), protocol_->url_seek(&context, 8, SEEK_CUR));
EXPECT_EQ(16, protocol_->url_seek(&context, 8, SEEK_CUR));
// SEEK_END should call GetSize() first, and if it succeeds add the offset
@@ -282,8 +282,8 @@
EXPECT_CALL(*protocol, GetPosition(_))
.WillOnce(DoAll(SetArgumentPointee<0>(8), Return(true)));
- EXPECT_EQ(AVERROR_IO, protocol_->url_seek(&context, -8, SEEK_END));
- EXPECT_EQ(AVERROR_IO, protocol_->url_seek(&context, -8, SEEK_END));
+ EXPECT_EQ(AVERROR(EIO), protocol_->url_seek(&context, -8, SEEK_END));
+ EXPECT_EQ(AVERROR(EIO), protocol_->url_seek(&context, -8, SEEK_END));
EXPECT_EQ(8, protocol_->url_seek(&context, -8, SEEK_END));
// AVSEEK_SIZE should be a straight-through call to GetSize().
@@ -293,7 +293,7 @@
EXPECT_CALL(*protocol, GetSize(_))
.WillOnce(DoAll(SetArgumentPointee<0>(16), Return(true)));
- EXPECT_EQ(AVERROR_IO, protocol_->url_seek(&context, 0, AVSEEK_SIZE));
+ EXPECT_EQ(AVERROR(EIO), protocol_->url_seek(&context, 0, AVSEEK_SIZE));
EXPECT_EQ(16, protocol_->url_seek(&context, 0, AVSEEK_SIZE));
// Destroy the protocol.
« no previous file with comments | « media/filters/ffmpeg_glue.cc ('k') | media/test/ffmpeg_tests/ffmpeg_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698