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

Unified Diff: core/fpdfapi/fpdf_parser/cpdf_object_unittest.cpp

Issue 2275593002: IndirectObjectHolder API updates (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Missed one Created 4 years, 4 months 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
« no previous file with comments | « core/fpdfapi/fpdf_parser/cpdf_indirect_object_holder.cpp ('k') | core/fpdfapi/fpdf_parser/cpdf_parser.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_parser/cpdf_object_unittest.cpp
diff --git a/core/fpdfapi/fpdf_parser/cpdf_object_unittest.cpp b/core/fpdfapi/fpdf_parser/cpdf_object_unittest.cpp
index a77f022c405d732359c640f71222a274c8679832..52b01fe3b48b62f76aab5cbebd6d02ee5580fed1 100644
--- a/core/fpdfapi/fpdf_parser/cpdf_object_unittest.cpp
+++ b/core/fpdfapi/fpdf_parser/cpdf_object_unittest.cpp
@@ -725,13 +725,14 @@ TEST(PDFArrayTest, AddReferenceAndGetObjectAt) {
// Create two arrays of references by different AddReference() APIs.
for (size_t i = 0; i < FX_ArraySize(indirect_objs); ++i) {
// All the indirect objects inserted will be owned by holder.
- holder->InsertIndirectObject(obj_nums[i], indirect_objs[i]);
+ holder->ReplaceIndirectObjectIfHigherGeneration(obj_nums[i],
+ indirect_objs[i]);
arr->AddReference(holder.get(), obj_nums[i]);
arr1->AddReference(holder.get(), indirect_objs[i]);
}
// Check indirect objects.
for (size_t i = 0; i < FX_ArraySize(obj_nums); ++i)
- EXPECT_EQ(indirect_objs[i], holder->GetIndirectObject(obj_nums[i]));
+ EXPECT_EQ(indirect_objs[i], holder->GetOrParseIndirectObject(obj_nums[i]));
// Check arrays.
EXPECT_EQ(arr->GetCount(), arr1->GetCount());
for (size_t i = 0; i < arr->GetCount(); ++i) {
« no previous file with comments | « core/fpdfapi/fpdf_parser/cpdf_indirect_object_holder.cpp ('k') | core/fpdfapi/fpdf_parser/cpdf_parser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698