Chromium Code Reviews| Index: media/gpu/video_encode_accelerator_unittest.cc |
| diff --git a/media/gpu/video_encode_accelerator_unittest.cc b/media/gpu/video_encode_accelerator_unittest.cc |
| index 9d9f5a4844ace3091fb5e3bb68c76bef3349f680..0efc27feb815f272c21cb759ef5373c461f74e86 100644 |
| --- a/media/gpu/video_encode_accelerator_unittest.cc |
| +++ b/media/gpu/video_encode_accelerator_unittest.cc |
| @@ -2074,9 +2074,16 @@ TEST_P(VideoEncodeAcceleratorTest, TestSimpleEncode) { |
| // encoders are created/destroyed, is a single GPU Process ChildThread. |
| // Moreover, we can't have proper multithreading on X11, so this could cause |
| // hard to debug issues there, if there were multiple "ChildThreads". |
| + bool wrong_state = false; |
| for (const auto& state : state_transitions) { |
| - for (size_t i = 0; i < num_concurrent_encoders; i++) |
| - ASSERT_EQ(state, notes[i]->Wait()); |
| + for (size_t i = 0; i < num_concurrent_encoders && !wrong_state; i++) { |
| + ClientState wait_state = notes[i]->Wait(); |
| + EXPECT_EQ(state, wait_state); |
| + wrong_state = (state != wait_state); |
| + } |
| + if (wrong_state) { |
|
wuchengli
2016/12/13 09:18:32
Can we use if (HasFailure())?
Same for line 2079.
|
| + break; |
| + } |
| } |
| for (size_t i = 0; i < num_concurrent_encoders; ++i) { |