vp9_header_parser_tests: check parser return

ensure ParseUncompressedHeader() succeeds with valid bitstreams

Change-Id: I1e3900fc08f3b6b2e86bc2f59fd8fd96bc26ad0f
diff --git a/common/vp9_header_parser_tests.cc b/common/vp9_header_parser_tests.cc
index c4610b9..e20ad98 100644
--- a/common/vp9_header_parser_tests.cc
+++ b/common/vp9_header_parser_tests.cc
@@ -59,7 +59,7 @@
     CreateAndLoadSegment(filename, 4);
   }
 
-  void ProcessTheFrames() {
+  void ProcessTheFrames(bool invalid_bitstream) {
     unsigned char* data = NULL;
     size_t data_len = 0;
     const mkvparser::Tracks* const parser_tracks = segment_->GetTracks();
@@ -96,7 +96,7 @@
             }
             ASSERT_FALSE(frame.Read(&reader_, data));
             parser_.SetFrame(data, data_len);
-            parser_.ParseUncompressedHeader();
+            ASSERT_EQ(parser_.ParseUncompressedHeader(), !invalid_bitstream);
           }
         }
 
@@ -119,8 +119,8 @@
 };
 
 TEST_F(Vp9HeaderParserTests, VideoOnlyFile) {
-  CreateAndLoadSegment("test_stereo_left_right.webm");
-  ProcessTheFrames();
+  ASSERT_NO_FATAL_FAILURE(CreateAndLoadSegment("test_stereo_left_right.webm"));
+  ProcessTheFrames(false);
   EXPECT_EQ(256, parser_.width());
   EXPECT_EQ(144, parser_.height());
   EXPECT_EQ(1, parser_.column_tiles());
@@ -128,8 +128,9 @@
 }
 
 TEST_F(Vp9HeaderParserTests, Muxed) {
-  CreateAndLoadSegment("bbb_480p_vp9_opus_1second.webm", 4);
-  ProcessTheFrames();
+  ASSERT_NO_FATAL_FAILURE(
+      CreateAndLoadSegment("bbb_480p_vp9_opus_1second.webm", 4));
+  ProcessTheFrames(false);
   EXPECT_EQ(854, parser_.width());
   EXPECT_EQ(480, parser_.height());
   EXPECT_EQ(2, parser_.column_tiles());