summaryrefslogtreecommitdiff
path: root/xfa/fde/css/cfde_cssvaluelistparser_unittest.cpp
diff options
context:
space:
mode:
authorChris Palmer <palmer@chromium.org>2017-04-06 14:45:39 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-04-06 23:40:27 +0000
commit2b797295d6851b3189bcb38c5994074f36453865 (patch)
tree90f119d1b1bff860e265c13919e19410282b6bda /xfa/fde/css/cfde_cssvaluelistparser_unittest.cpp
parent8a24b25ee0b08128b28dfae0ee86b8348a51b40b (diff)
downloadpdfium-2b797295d6851b3189bcb38c5994074f36453865.tar.xz
Fix unit tests to initialize PartitionAlloc.
Tests need to be subclasses of FPDF_Test. BUG=pdfium:700 Change-Id: I317ec2c49567e58cb57c6222e387574226f594b3 Reviewed-on: https://pdfium-review.googlesource.com/3890 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Chris Palmer <palmer@chromium.org>
Diffstat (limited to 'xfa/fde/css/cfde_cssvaluelistparser_unittest.cpp')
-rw-r--r--xfa/fde/css/cfde_cssvaluelistparser_unittest.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/xfa/fde/css/cfde_cssvaluelistparser_unittest.cpp b/xfa/fde/css/cfde_cssvaluelistparser_unittest.cpp
index 2864c842ad..077fb54e93 100644
--- a/xfa/fde/css/cfde_cssvaluelistparser_unittest.cpp
+++ b/xfa/fde/css/cfde_cssvaluelistparser_unittest.cpp
@@ -7,9 +7,12 @@
#include "xfa/fde/css/cfde_cssvaluelistparser.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "testing/test_support.h"
#include "third_party/base/ptr_util.h"
-TEST(CFDE_CSSValueListParser, rgb_short) {
+class CFDE_CSSValueListParserTest : public pdfium::FPDF_Test {};
+
+TEST_F(CFDE_CSSValueListParserTest, rgb_short) {
FDE_CSSPrimitiveType type;
const wchar_t* start;
int32_t len;
@@ -40,7 +43,7 @@ TEST(CFDE_CSSValueListParser, rgb_short) {
EXPECT_FALSE(parser->NextValue(type, start, len));
}
-TEST(CFDE_CSSValueListParser, number_parsing) {
+TEST_F(CFDE_CSSValueListParserTest, number_parsing) {
FDE_CSSPrimitiveType type;
const wchar_t* start;
int32_t len;
@@ -82,7 +85,7 @@ TEST(CFDE_CSSValueListParser, number_parsing) {
EXPECT_EQ(L"43a1.12.34", CFX_WideString(start, len));
}
-TEST(CFDE_CSSValueListParser, string_parsing) {
+TEST_F(CFDE_CSSValueListParserTest, string_parsing) {
FDE_CSSPrimitiveType type;
const wchar_t* start;
int32_t len;
@@ -105,7 +108,7 @@ TEST(CFDE_CSSValueListParser, string_parsing) {
EXPECT_EQ(L"standalone", CFX_WideString(start, len));
}
-TEST(CFDE_CSSValueListParser, multiparsing) {
+TEST_F(CFDE_CSSValueListParserTest, multiparsing) {
FDE_CSSPrimitiveType type;
const wchar_t* start;
int32_t len;