summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/cpdf_streamcontentparser_unittest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/page/cpdf_streamcontentparser_unittest.cpp')
-rw-r--r--core/fpdfapi/page/cpdf_streamcontentparser_unittest.cpp38
1 files changed, 21 insertions, 17 deletions
diff --git a/core/fpdfapi/page/cpdf_streamcontentparser_unittest.cpp b/core/fpdfapi/page/cpdf_streamcontentparser_unittest.cpp
index ffc0d95107..6b43935a1d 100644
--- a/core/fpdfapi/page/cpdf_streamcontentparser_unittest.cpp
+++ b/core/fpdfapi/page/cpdf_streamcontentparser_unittest.cpp
@@ -6,35 +6,39 @@
#include "testing/gtest/include/gtest/gtest.h"
TEST(cpdf_streamcontentparser, PDF_FindKeyAbbreviation) {
- CPDF_StreamContentParser parser(nullptr, nullptr, nullptr, nullptr, nullptr,
- nullptr, nullptr, nullptr, 0);
-
EXPECT_EQ(CFX_ByteStringC("BitsPerComponent"),
- parser.FindKeyAbbreviationForTesting(CFX_ByteStringC("BPC")));
+ CPDF_StreamContentParser::FindKeyAbbreviationForTesting(
+ CFX_ByteStringC("BPC")));
EXPECT_EQ(CFX_ByteStringC("Width"),
- parser.FindKeyAbbreviationForTesting(CFX_ByteStringC("W")));
+ CPDF_StreamContentParser::FindKeyAbbreviationForTesting(
+ CFX_ByteStringC("W")));
EXPECT_EQ(CFX_ByteStringC(""),
- parser.FindKeyAbbreviationForTesting(CFX_ByteStringC("")));
+ CPDF_StreamContentParser::FindKeyAbbreviationForTesting(
+ CFX_ByteStringC("")));
EXPECT_EQ(CFX_ByteStringC(""),
- parser.FindKeyAbbreviationForTesting(CFX_ByteStringC("NoInList")));
+ CPDF_StreamContentParser::FindKeyAbbreviationForTesting(
+ CFX_ByteStringC("NoInList")));
// Prefix should not match.
EXPECT_EQ(CFX_ByteStringC(""),
- parser.FindKeyAbbreviationForTesting(CFX_ByteStringC("WW")));
+ CPDF_StreamContentParser::FindKeyAbbreviationForTesting(
+ CFX_ByteStringC("WW")));
}
TEST(cpdf_streamcontentparser, PDF_FindValueAbbreviation) {
- CPDF_StreamContentParser parser(nullptr, nullptr, nullptr, nullptr, nullptr,
- nullptr, nullptr, nullptr, 0);
-
EXPECT_EQ(CFX_ByteStringC("DeviceGray"),
- parser.FindValueAbbreviationForTesting(CFX_ByteStringC("G")));
+ CPDF_StreamContentParser::FindValueAbbreviationForTesting(
+ CFX_ByteStringC("G")));
EXPECT_EQ(CFX_ByteStringC("DCTDecode"),
- parser.FindValueAbbreviationForTesting(CFX_ByteStringC("DCT")));
+ CPDF_StreamContentParser::FindValueAbbreviationForTesting(
+ CFX_ByteStringC("DCT")));
+ EXPECT_EQ(CFX_ByteStringC(""),
+ CPDF_StreamContentParser::FindValueAbbreviationForTesting(
+ CFX_ByteStringC("")));
EXPECT_EQ(CFX_ByteStringC(""),
- parser.FindValueAbbreviationForTesting(CFX_ByteStringC("")));
- EXPECT_EQ(CFX_ByteStringC(""), parser.FindValueAbbreviationForTesting(
- CFX_ByteStringC("NoInList")));
+ CPDF_StreamContentParser::FindValueAbbreviationForTesting(
+ CFX_ByteStringC("NoInList")));
// Prefix should not match.
EXPECT_EQ(CFX_ByteStringC(""),
- parser.FindValueAbbreviationForTesting(CFX_ByteStringC("II")));
+ CPDF_StreamContentParser::FindValueAbbreviationForTesting(
+ CFX_ByteStringC("II")));
}