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

Side by Side Diff: fpdfsdk/fpdfppo_embeddertest.cpp

Issue 2495003006: Fix unique ptrs in fpdfppo.cpp (Closed)
Patch Set: rebase Created 4 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 unified diff | Download patch
« no previous file with comments | « fpdfsdk/fpdfppo.cpp ('k') | fpdfsdk/fpdfsave_embeddertest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "public/fpdf_ppo.h" 5 #include "public/fpdf_ppo.h"
6 6
7 #include "core/fxcrt/fx_basic.h" 7 #include "core/fxcrt/fx_basic.h"
8 #include "public/fpdf_edit.h" 8 #include "public/fpdf_edit.h"
9 #include "public/fpdfview.h" 9 #include "public/fpdfview.h"
10 #include "testing/embedder_test.h" 10 #include "testing/embedder_test.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 FPDF_DOCUMENT output_doc = FPDF_CreateNewDocument(); 83 FPDF_DOCUMENT output_doc = FPDF_CreateNewDocument();
84 EXPECT_TRUE(output_doc); 84 EXPECT_TRUE(output_doc);
85 EXPECT_TRUE(FPDF_CopyViewerPreferences(output_doc, document())); 85 EXPECT_TRUE(FPDF_CopyViewerPreferences(output_doc, document()));
86 EXPECT_TRUE(FPDF_ImportPages(output_doc, document(), "1,1,1,1", 0)); 86 EXPECT_TRUE(FPDF_ImportPages(output_doc, document(), "1,1,1,1", 0));
87 EXPECT_TRUE(FPDF_ImportPages(output_doc, document(), "1-1", 0)); 87 EXPECT_TRUE(FPDF_ImportPages(output_doc, document(), "1-1", 0));
88 EXPECT_EQ(5, FPDF_GetPageCount(output_doc)); 88 EXPECT_EQ(5, FPDF_GetPageCount(output_doc));
89 FPDF_CloseDocument(output_doc); 89 FPDF_CloseDocument(output_doc);
90 90
91 UnloadPage(page); 91 UnloadPage(page);
92 } 92 }
93
94 TEST_F(FPDFPPOEmbeddertest, BUG_664284) {
95 EXPECT_TRUE(OpenDocument("bug_664284.pdf"));
96
97 FPDF_PAGE page = LoadPage(0);
98 EXPECT_TRUE(page);
99
100 FPDF_DOCUMENT output_doc = FPDF_CreateNewDocument();
101 EXPECT_TRUE(output_doc);
102 EXPECT_TRUE(FPDF_ImportPages(output_doc, document(), "1", 0));
103 FPDF_CloseDocument(output_doc);
104
105 UnloadPage(page);
106 }
OLDNEW
« no previous file with comments | « fpdfsdk/fpdfppo.cpp ('k') | fpdfsdk/fpdfsave_embeddertest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698