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

Side by Side Diff: ppapi/proxy/video_encoder_resource_unittest.cc

Issue 1138483002: ppapi: fix crash/infinite loop in VideoEncoder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comment Created 5 years, 7 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
« no previous file with comments | « ppapi/proxy/video_encoder_resource.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/memory/shared_memory.h" 5 #include "base/memory/shared_memory.h"
6 #include "base/process/process.h" 6 #include "base/process/process.h"
7 #include "base/synchronization/waitable_event.h" 7 #include "base/synchronization/waitable_event.h"
8 #include "ppapi/c/pp_codecs.h" 8 #include "ppapi/c/pp_codecs.h"
9 #include "ppapi/c/pp_errors.h" 9 #include "ppapi/c/pp_errors.h"
10 #include "ppapi/c/ppb_video_encoder.h" 10 #include "ppapi/c/ppb_video_encoder.h"
(...skipping 1118 matching lines...) Expand 10 before | Expand all | Expand 10 after
1129 &get_bitstream_buffer_cb)); 1129 &get_bitstream_buffer_cb));
1130 1130
1131 CallClose(encoder.get()); 1131 CallClose(encoder.get());
1132 1132
1133 ASSERT_TRUE(encode_cb1.called()); 1133 ASSERT_TRUE(encode_cb1.called());
1134 ASSERT_EQ(PP_ERROR_ABORTED, encode_cb1.result()); 1134 ASSERT_EQ(PP_ERROR_ABORTED, encode_cb1.result());
1135 ASSERT_TRUE(encode_cb2.called()); 1135 ASSERT_TRUE(encode_cb2.called());
1136 ASSERT_EQ(PP_ERROR_ABORTED, encode_cb2.result()); 1136 ASSERT_EQ(PP_ERROR_ABORTED, encode_cb2.result());
1137 ASSERT_TRUE(get_bitstream_buffer_cb.called()); 1137 ASSERT_TRUE(get_bitstream_buffer_cb.called());
1138 ASSERT_EQ(PP_ERROR_ABORTED, get_bitstream_buffer_cb.result()); 1138 ASSERT_EQ(PP_ERROR_ABORTED, get_bitstream_buffer_cb.result());
1139
1140 // Verify that a remaining encode response from the renderer is
1141 // discarded.
1142 ResourceMessageCallParams params;
1143 uint32_t frame_id;
1144 bool force_frame;
1145 ASSERT_TRUE(CheckEncodeMsg(&params, &frame_id, &force_frame));
1146 SendEncodeReply(params, frame_id);
1139 } 1147 }
1140 } 1148 }
1141 1149
1142 } // namespace proxy 1150 } // namespace proxy
1143 } // namespace ppapi 1151 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/video_encoder_resource.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698