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

Unified Diff: ppapi/proxy/video_decoder_resource_unittest.cc

Issue 703753002: Pepper: Expose visible_rect to PPB_VideoDecoder.GetPicture. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
Index: ppapi/proxy/video_decoder_resource_unittest.cc
diff --git a/ppapi/proxy/video_decoder_resource_unittest.cc b/ppapi/proxy/video_decoder_resource_unittest.cc
index fa6e89f985ddcec71f7d0a80b956dfb0a3fcb10f..7a8534a308b46767034eb440676a02c19db6bfd4 100644
--- a/ppapi/proxy/video_decoder_resource_unittest.cc
+++ b/ppapi/proxy/video_decoder_resource_unittest.cc
@@ -216,11 +216,10 @@ class VideoDecoderResourceTest : public PluginProxyTest {
void SendPictureReady(const ResourceMessageCallParams& params,
uint32_t decode_count,
- uint32_t texture_id) {
- SendReply(
- params,
- PP_OK,
- PpapiPluginMsg_VideoDecoder_PictureReady(decode_count, texture_id));
+ uint32_t texture_id,
+ PP_Rect* visible_rect) {
+ SendReply(params, PP_OK, PpapiPluginMsg_VideoDecoder_PictureReady(
+ decode_count, texture_id, *visible_rect));
}
void SendFlushReply(const ResourceMessageCallParams& params) {
@@ -431,6 +430,7 @@ TEST_F(VideoDecoderResourceTest, DecodeAndGetPicture) {
// Now try to get a picture. No picture ready message has been received yet.
PP_VideoPicture picture;
+ PP_Rect visible_rect;
ASSERT_EQ(PP_OK_COMPLETIONPENDING,
CallGetPicture(decoder.get(), &picture, &get_picture_cb));
ASSERT_FALSE(get_picture_cb.called());
@@ -442,7 +442,7 @@ TEST_F(VideoDecoderResourceTest, DecodeAndGetPicture) {
SendRequestTextures(params);
// Send a picture ready message for Decode call 1. The GetPicture callback
// should complete.
- SendPictureReady(params, 1U, kTextureId1);
+ SendPictureReady(params, 1U, kTextureId1, &visible_rect);
ASSERT_TRUE(get_picture_cb.called());
ASSERT_EQ(PP_OK, get_picture_cb.result());
ASSERT_EQ(kDecodeId, picture.decode_id);
@@ -450,7 +450,7 @@ TEST_F(VideoDecoderResourceTest, DecodeAndGetPicture) {
// Send a picture ready message for Decode call 2. Since there is no pending
// GetPicture call, the picture should be queued.
- SendPictureReady(params, 2U, kTextureId2);
+ SendPictureReady(params, 2U, kTextureId2, &visible_rect);
// The next GetPicture should return synchronously.
ASSERT_EQ(PP_OK, CallGetPicture(decoder.get(), &picture, &uncalled_cb));
ASSERT_FALSE(uncalled_cb.called());
@@ -480,9 +480,10 @@ TEST_F(VideoDecoderResourceTest, RecyclePicture) {
// Call GetPicture and send 'picture ready' message to get a picture to
// recycle.
PP_VideoPicture picture;
+ PP_Rect visible_rect;
ASSERT_EQ(PP_OK_COMPLETIONPENDING,
CallGetPicture(decoder.get(), &picture, &get_picture_cb));
- SendPictureReady(params, 0U, kTextureId1);
+ SendPictureReady(params, 0U, kTextureId1, &visible_rect);
ASSERT_EQ(kTextureId1, picture.texture_id);
CallRecyclePicture(decoder.get(), picture);

Powered by Google App Engine
This is Rietveld 408576698