From 3842a5b43c8f26d2f8a098e4c33a5e4ea2b02f90 Mon Sep 17 00:00:00 2001 From: KongQun Yang Date: Thu, 22 Oct 2015 17:40:11 -0700 Subject: [PATCH] Use StrEq for string comparison in webm_parser_unittest Change-Id: Iaa02b7e8f318508b4de38bd258453095686c431d --- packager/media/formats/webm/webm_parser_unittest.cc | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/packager/media/formats/webm/webm_parser_unittest.cc b/packager/media/formats/webm/webm_parser_unittest.cc index 6d4f24de56..434ebf9e7f 100644 --- a/packager/media/formats/webm/webm_parser_unittest.cc +++ b/packager/media/formats/webm/webm_parser_unittest.cc @@ -13,6 +13,7 @@ using ::testing::InSequence; using ::testing::Return; using ::testing::ReturnNull; +using ::testing::StrEq; using ::testing::StrictMock; using ::testing::_; @@ -393,10 +394,14 @@ TEST_F(WebMParserTest, ZeroPaddedStrings) { InSequence s; EXPECT_CALL(client_, OnListStart(kWebMIdEBMLHeader)) .WillOnce(Return(&client_)); - EXPECT_CALL(client_, OnString(kWebMIdDocType, "")).WillOnce(Return(true)); - EXPECT_CALL(client_, OnString(kWebMIdDocType, "")).WillOnce(Return(true)); - EXPECT_CALL(client_, OnString(kWebMIdDocType, "a")).WillOnce(Return(true)); - EXPECT_CALL(client_, OnString(kWebMIdDocType, "a")).WillOnce(Return(true)); + EXPECT_CALL(client_, OnString(kWebMIdDocType, StrEq(""))) + .WillOnce(Return(true)); + EXPECT_CALL(client_, OnString(kWebMIdDocType, StrEq(""))) + .WillOnce(Return(true)); + EXPECT_CALL(client_, OnString(kWebMIdDocType, StrEq("a"))) + .WillOnce(Return(true)); + EXPECT_CALL(client_, OnString(kWebMIdDocType, StrEq("a"))) + .WillOnce(Return(true)); EXPECT_CALL(client_, OnListEnd(kWebMIdEBMLHeader)).WillOnce(Return(true)); WebMListParser parser(kWebMIdEBMLHeader, &client_);