| 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_edit.h" | 5 #include "public/fpdf_edit.h" |
| 6 | 6 |
| 7 #include "core/fpdfapi/include/cpdf_modulemgr.h" | 7 #include "core/fpdfapi/cpdf_modulemgr.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 9 | 9 |
| 10 class PDFEditTest : public testing::Test { | 10 class PDFEditTest : public testing::Test { |
| 11 void SetUp() override { | 11 void SetUp() override { |
| 12 CPDF_ModuleMgr* module_mgr = CPDF_ModuleMgr::Get(); | 12 CPDF_ModuleMgr* module_mgr = CPDF_ModuleMgr::Get(); |
| 13 module_mgr->InitPageModule(); | 13 module_mgr->InitPageModule(); |
| 14 } | 14 } |
| 15 | 15 |
| 16 void TearDown() override { CPDF_ModuleMgr::Destroy(); } | 16 void TearDown() override { CPDF_ModuleMgr::Destroy(); } |
| 17 }; | 17 }; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 ASSERT_TRUE( | 64 ASSERT_TRUE( |
| 65 FPDFImageObj_SetMatrix(page_image, kBitmapSize, 0, 0, kBitmapSize, 0, 0)); | 65 FPDFImageObj_SetMatrix(page_image, kBitmapSize, 0, 0, kBitmapSize, 0, 0)); |
| 66 FPDFPage_InsertObject(page, page_image); | 66 FPDFPage_InsertObject(page, page_image); |
| 67 EXPECT_EQ(1, FPDFPage_CountObject(page)); | 67 EXPECT_EQ(1, FPDFPage_CountObject(page)); |
| 68 EXPECT_TRUE(FPDFPage_GenerateContent(page)); | 68 EXPECT_TRUE(FPDFPage_GenerateContent(page)); |
| 69 | 69 |
| 70 FPDFBitmap_Destroy(bitmap); | 70 FPDFBitmap_Destroy(bitmap); |
| 71 FPDF_ClosePage(page); | 71 FPDF_ClosePage(page); |
| 72 FPDF_CloseDocument(doc); | 72 FPDF_CloseDocument(doc); |
| 73 } | 73 } |
| OLD | NEW |