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

Unified Diff: media/gpu/video_encode_accelerator_unittest.cc

Issue 2573733002: VEA unittest: fix TestSimpleEncode crash while decoder fails (Closed)
Patch Set: VEA unittest: fix TestSimpleEncode crash while decoder fails Created 4 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 edb7e00788adc66428a541d03b80aee6872971ba..15c1d4abc223c3c58e934ebdc4590c34ab4fcd1c 100644
--- a/media/gpu/video_encode_accelerator_unittest.cc
+++ b/media/gpu/video_encode_accelerator_unittest.cc
@@ -2075,8 +2075,12 @@ TEST_P(VideoEncodeAcceleratorTest, TestSimpleEncode) {
// Moreover, we can't have proper multithreading on X11, so this could cause
// hard to debug issues there, if there were multiple "ChildThreads".
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 && !HasFailure(); i++) {
+ EXPECT_EQ(state, notes[i]->Wait());
+ }
+ if (HasFailure()) {
+ break;
+ }
}
for (size_t i = 0; i < num_concurrent_encoders; ++i) {
@@ -2113,9 +2117,8 @@ void SimpleTestFunc() {
CS_FINISHED};
for (const auto& state : state_transitions) {
- ClientState wait_state = note->Wait();
- EXPECT_EQ(state, wait_state);
- if (state != wait_state) {
+ EXPECT_EQ(state, note->Wait());
+ if (testing::Test::HasFailure()) {
break;
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698