OLD | NEW |
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 Loading... |
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(¶ms, &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 |
OLD | NEW |