diff options
Diffstat (limited to 'core/fxcrt/xml')
-rw-r--r-- | core/fxcrt/xml/cfx_saxreader_unittest.cpp | 2 | ||||
-rw-r--r-- | core/fxcrt/xml/cfx_xmlsyntaxparser_unittest.cpp | 34 |
2 files changed, 17 insertions, 19 deletions
diff --git a/core/fxcrt/xml/cfx_saxreader_unittest.cpp b/core/fxcrt/xml/cfx_saxreader_unittest.cpp index 0bb5e1a066..dca93b3a16 100644 --- a/core/fxcrt/xml/cfx_saxreader_unittest.cpp +++ b/core/fxcrt/xml/cfx_saxreader_unittest.cpp @@ -44,7 +44,7 @@ class MockHandler : public CFX_SAXReader::HandlerIface { } // namespace -class CFX_SAXReaderTest : public pdfium::FPDF_Test { +class CFX_SAXReaderTest : public testing::Test { public: void SetHandler(CFX_SAXReader::HandlerIface* handler) { reader_.SetHandler(handler); diff --git a/core/fxcrt/xml/cfx_xmlsyntaxparser_unittest.cpp b/core/fxcrt/xml/cfx_xmlsyntaxparser_unittest.cpp index 09d4fea2d2..c3cc3d26bf 100644 --- a/core/fxcrt/xml/cfx_xmlsyntaxparser_unittest.cpp +++ b/core/fxcrt/xml/cfx_xmlsyntaxparser_unittest.cpp @@ -11,9 +11,7 @@ #include "testing/gtest/include/gtest/gtest.h" #include "testing/test_support.h" -class CFX_XMLSyntaxParserTest : public pdfium::FPDF_Test {}; - -TEST_F(CFX_XMLSyntaxParserTest, CData) { +TEST(CFX_XMLSyntaxParserTest, CData) { const char* input = "<script contentType=\"application/x-javascript\">\n" " <![CDATA[\n" @@ -59,7 +57,7 @@ TEST_F(CFX_XMLSyntaxParserTest, CData) { ASSERT_EQ(FX_XmlSyntaxResult::EndOfString, parser.DoSyntaxParse()); } -TEST_F(CFX_XMLSyntaxParserTest, CDataWithInnerScript) { +TEST(CFX_XMLSyntaxParserTest, CDataWithInnerScript) { const char* input = "<script contentType=\"application/x-javascript\">\n" " <![CDATA[\n" @@ -107,7 +105,7 @@ TEST_F(CFX_XMLSyntaxParserTest, CDataWithInnerScript) { ASSERT_EQ(FX_XmlSyntaxResult::EndOfString, parser.DoSyntaxParse()); } -TEST_F(CFX_XMLSyntaxParserTest, ArrowBangArrow) { +TEST(CFX_XMLSyntaxParserTest, ArrowBangArrow) { const char* input = "<script contentType=\"application/x-javascript\">\n" " <!>\n" @@ -142,7 +140,7 @@ TEST_F(CFX_XMLSyntaxParserTest, ArrowBangArrow) { ASSERT_EQ(FX_XmlSyntaxResult::EndOfString, parser.DoSyntaxParse()); } -TEST_F(CFX_XMLSyntaxParserTest, ArrowBangBracketArrow) { +TEST(CFX_XMLSyntaxParserTest, ArrowBangBracketArrow) { const char* input = "<script contentType=\"application/x-javascript\">\n" " <![>\n" @@ -172,7 +170,7 @@ TEST_F(CFX_XMLSyntaxParserTest, ArrowBangBracketArrow) { ASSERT_EQ(FX_XmlSyntaxResult::EndOfString, parser.DoSyntaxParse()); } -TEST_F(CFX_XMLSyntaxParserTest, IncompleteCData) { +TEST(CFX_XMLSyntaxParserTest, IncompleteCData) { const char* input = "<script contentType=\"application/x-javascript\">\n" " <![CDATA>\n" @@ -202,7 +200,7 @@ TEST_F(CFX_XMLSyntaxParserTest, IncompleteCData) { ASSERT_EQ(FX_XmlSyntaxResult::EndOfString, parser.DoSyntaxParse()); } -TEST_F(CFX_XMLSyntaxParserTest, UnClosedCData) { +TEST(CFX_XMLSyntaxParserTest, UnClosedCData) { const char* input = "<script contentType=\"application/x-javascript\">\n" " <![CDATA[\n" @@ -232,7 +230,7 @@ TEST_F(CFX_XMLSyntaxParserTest, UnClosedCData) { ASSERT_EQ(FX_XmlSyntaxResult::EndOfString, parser.DoSyntaxParse()); } -TEST_F(CFX_XMLSyntaxParserTest, EmptyCData) { +TEST(CFX_XMLSyntaxParserTest, EmptyCData) { const char* input = "<script contentType=\"application/x-javascript\">\n" " <![CDATA[]]>\n" @@ -269,7 +267,7 @@ TEST_F(CFX_XMLSyntaxParserTest, EmptyCData) { ASSERT_EQ(FX_XmlSyntaxResult::EndOfString, parser.DoSyntaxParse()); } -TEST_F(CFX_XMLSyntaxParserTest, Comment) { +TEST(CFX_XMLSyntaxParserTest, Comment) { const char* input = "<script contentType=\"application/x-javascript\">\n" " <!-- A Comment -->\n" @@ -303,7 +301,7 @@ TEST_F(CFX_XMLSyntaxParserTest, Comment) { ASSERT_EQ(FX_XmlSyntaxResult::EndOfString, parser.DoSyntaxParse()); } -TEST_F(CFX_XMLSyntaxParserTest, IncorrectCommentStart) { +TEST(CFX_XMLSyntaxParserTest, IncorrectCommentStart) { const char* input = "<script contentType=\"application/x-javascript\">\n" " <!- A Comment -->\n" @@ -337,7 +335,7 @@ TEST_F(CFX_XMLSyntaxParserTest, IncorrectCommentStart) { ASSERT_EQ(FX_XmlSyntaxResult::EndOfString, parser.DoSyntaxParse()); } -TEST_F(CFX_XMLSyntaxParserTest, CommentEmpty) { +TEST(CFX_XMLSyntaxParserTest, CommentEmpty) { const char* input = "<script contentType=\"application/x-javascript\">\n" " <!---->\n" @@ -371,7 +369,7 @@ TEST_F(CFX_XMLSyntaxParserTest, CommentEmpty) { ASSERT_EQ(FX_XmlSyntaxResult::EndOfString, parser.DoSyntaxParse()); } -TEST_F(CFX_XMLSyntaxParserTest, CommentThreeDash) { +TEST(CFX_XMLSyntaxParserTest, CommentThreeDash) { const char* input = "<script contentType=\"application/x-javascript\">\n" " <!--->\n" @@ -399,7 +397,7 @@ TEST_F(CFX_XMLSyntaxParserTest, CommentThreeDash) { ASSERT_EQ(FX_XmlSyntaxResult::EndOfString, parser.DoSyntaxParse()); } -TEST_F(CFX_XMLSyntaxParserTest, CommentTwoDash) { +TEST(CFX_XMLSyntaxParserTest, CommentTwoDash) { const char* input = "<script contentType=\"application/x-javascript\">\n" " <!-->\n" @@ -427,7 +425,7 @@ TEST_F(CFX_XMLSyntaxParserTest, CommentTwoDash) { ASSERT_EQ(FX_XmlSyntaxResult::EndOfString, parser.DoSyntaxParse()); } -TEST_F(CFX_XMLSyntaxParserTest, Entities) { +TEST(CFX_XMLSyntaxParserTest, Entities) { const char* input = "<script contentType=\"application/x-javascript\">" "B" @@ -462,7 +460,7 @@ TEST_F(CFX_XMLSyntaxParserTest, Entities) { ASSERT_EQ(FX_XmlSyntaxResult::EndOfString, parser.DoSyntaxParse()); } -TEST_F(CFX_XMLSyntaxParserTest, EntityOverflowHex) { +TEST(CFX_XMLSyntaxParserTest, EntityOverflowHex) { const char* input = "<script contentType=\"application/x-javascript\">" "�" @@ -494,7 +492,7 @@ TEST_F(CFX_XMLSyntaxParserTest, EntityOverflowHex) { ASSERT_EQ(FX_XmlSyntaxResult::EndOfString, parser.DoSyntaxParse()); } -TEST_F(CFX_XMLSyntaxParserTest, EntityOverflowDecimal) { +TEST(CFX_XMLSyntaxParserTest, EntityOverflowDecimal) { const char* input = "<script contentType=\"application/x-javascript\">" "�" @@ -526,7 +524,7 @@ TEST_F(CFX_XMLSyntaxParserTest, EntityOverflowDecimal) { ASSERT_EQ(FX_XmlSyntaxResult::EndOfString, parser.DoSyntaxParse()); } -TEST_F(CFX_XMLSyntaxParserTest, IsXMLNameChar) { +TEST(CFX_XMLSyntaxParserTest, IsXMLNameChar) { EXPECT_FALSE(CFX_XMLSyntaxParser::IsXMLNameChar(L'-', true)); EXPECT_TRUE(CFX_XMLSyntaxParser::IsXMLNameChar(L'-', false)); |