| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |