Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(827)

Unified Diff: core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_unittest.cpp

Issue 1411403012: Merge to XFA: Add path service to retrieve test data directory at run time so tests can be run from… (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: remove a blank line Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_unittest.cpp
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_unittest.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_unittest.cpp
index 73b46b52c2cbe78bef5628790ade1f4955d33c20..b86c20e9dab49b1b68277b0bfe26e4c1230bb4ef 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_unittest.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_unittest.cpp
@@ -6,6 +6,7 @@
#include "../../../include/fpdfapi/fpdf_parser.h"
#include "../../../include/fxcrt/fx_stream.h"
+#include "testing/utils/path_service.h"
class CPDF_TestParser : public CPDF_Parser {
public:
@@ -193,8 +194,10 @@ TEST(fpdf_parser_parser, ReadHexString) {
TEST(fpdf_parser_parser, RebuildCrossRefCorrectly) {
CPDF_TestParser parser;
- ASSERT_TRUE(
- parser.InitTest("testing/resources/parser_rebuildxref_correct.pdf"));
+ std::string test_file;
+ ASSERT_TRUE(PathService::GetTestFilePath("parser_rebuildxref_correct.pdf",
+ &test_file));
+ ASSERT_TRUE(parser.InitTest(test_file.c_str())) << test_file;
ASSERT_TRUE(parser.RebuildCrossRef());
const FX_FILESIZE offsets[] = {0, 15, 61, 154, 296, 374, 450};

Powered by Google App Engine
This is Rietveld 408576698