![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#include <embedder_test.h>
Inherits testing::Test, _UNSUPPORT_INFO, _IPDF_JsPlatform, _FPDF_FORMFILLINFO, and FPDF_FILEWRITE_.
Inherited by CFX_WindowsRenderDeviceTest, CFX_WindowsRenderDeviceTest, CPDFParserEmbedderTest, CPDFParserEmbedderTest, CPDFSDKAnnotIteratorTest, CPDFSDKAnnotIteratorTest, CPDFSDKBAAnnotTest, CPDFSDKBAAnnotTest, CPDFSecurityHandlerEmbedderTest, CPDFSecurityHandlerEmbedderTest, CPDF_CreatorEmbedderTest, CPDF_CreatorEmbedderTest, CPWLComboBoxEmbedderTest, CPWLEditEmbedderTest, CPWLEditEmbedderTest, CPWLSpecialButtonEmbedderTest, CPWLSpecialButtonEmbedderTest, CXFASimpleParserEmbedderTest, CXFASimpleParserEmbedderTest, FPDFAnnotEmbedderTest, FPDFAnnotEmbedderTest, FPDFAttachmentEmbedderTest, FPDFAttachmentEmbedderTest, FPDFDataAvailEmbedderTest, FPDFDataAvailEmbedderTest, FPDFDocEmbedderTest, FPDFDocEmbedderTest, FPDFEditEmbedderTest, FPDFEditEmbedderTest, FPDFEditMoveEmbedderTest, FPDFEditMoveEmbedderTest, FPDFEditPageEmbedderTest, FPDFEditPageEmbedderTest, FPDFExtEmbedderTest, FPDFExtEmbedderTest, FPDFFormFillActionUriTest, FPDFFormFillActionUriTest, FPDFFormFillInteractiveEmbedderTest, FPDFFormFillInteractiveEmbedderTest, FPDFJavaScriptEmbedderTest, FPDFJavaScriptEmbedderTest, FPDFProgressiveRenderEmbedderTest, FPDFProgressiveRenderEmbedderTest, FPDFRenderPatternEmbedderTest, FPDFRenderPatternEmbedderTest, FPDFSaveEmbedderTest, FPDFSaveEmbedderTest, FPDFSearchExEmbedderTest, FPDFSearchExEmbedderTest, FPDFSignatureEmbedderTest, FPDFSignatureEmbedderTest, FPDFStructTreeEmbedderTest, FPDFStructTreeEmbedderTest, FPDFTextEmbedderTest, FPDFTextEmbedderTest, FPDFThumbnailEmbedderTest, FPDFThumbnailEmbedderTest, FPDFTransformEmbedderTest, FPDFTransformEmbedderTest, FPDFViewEmbedderTest, FPDFViewEmbedderTest, FXGETextEmbedderTest, FXGETextEmbedderTest, JBig2EmbedderTest, JBig2EmbedderTest, JSEmbedderTest, PDFEditImgTest, and PDFEditImgTest.
Classes | |
class | Delegate |
class | ScopedEmbedderTestPage |
Public Types | |
enum class | LinearizeOption { kDefaultLinearize , kMustLinearize } |
enum class | JavaScriptOption { kDisableJavaScript , kEnableJavaScript } |
Static Public Member Functions | |
static ScopedFPDFBitmap | RenderPageWithFlags (FPDF_PAGE page, FPDF_FORMHANDLE handle, int flags) |
static ScopedFPDFBitmap | RenderPage (FPDF_PAGE page) |
static int | BytesPerPixelForFormat (int format) |
Protected Types | |
using | PageNumberToHandleMap = std::map<int, FPDF_PAGE> |
Protected Member Functions | |
bool | OpenDocumentHelper (const char *password, LinearizeOption linearize_option, JavaScriptOption javascript_option, FakeFileAccess *network_simulator, ScopedFPDFDocument *document, ScopedFPDFAvail *avail, ScopedFPDFFormHandle *form_handle) |
FPDF_FORMHANDLE | SetupFormFillEnvironment (FPDF_DOCUMENT doc, JavaScriptOption javascript_option) |
void | ClearString () |
const std::string & | GetString () const |
FPDF_DOCUMENT | OpenSavedDocument () |
FPDF_DOCUMENT | OpenSavedDocumentWithPassword (const char *password) |
void | CloseSavedDocument () |
FPDF_PAGE | LoadSavedPage (int page_index) |
void | CloseSavedPage (FPDF_PAGE page) |
void | VerifySavedRendering (FPDF_PAGE page, int width, int height, const char *md5) |
void | VerifySavedDocument (int width, int height, const char *md5) |
void | SetWholeFileAvailable () |
void | OpenPDFFileForWrite (const std::string &filename) |
void | ClosePDFFileForWrite () |
Static Protected Member Functions | |
static std::string | HashBitmap (FPDF_BITMAP bitmap) |
static void | WriteBitmapToPng (FPDF_BITMAP bitmap, const std::string &filename) |
static void | CompareBitmap (FPDF_BITMAP bitmap, int expected_width, int expected_height, const char *expected_md5sum) |
static int | GetBlockFromString (void *param, unsigned long pos, unsigned char *buf, unsigned long size) |
Definition at line 36 of file embedder_test.h.
|
protected |
Definition at line 250 of file embedder_test.h.
|
strong |
Enumerator | |
---|---|
kDisableJavaScript | |
kEnableJavaScript |
Definition at line 43 of file embedder_test.h.
|
strong |
Enumerator | |
---|---|
kDefaultLinearize | |
kMustLinearize |
Definition at line 42 of file embedder_test.h.
EmbedderTest::EmbedderTest | ( | ) |
Definition at line 267 of file embedder_test.cpp.
References EmbedderTest(), FPDF_FILEWRITE_::version, and FPDF_FILEWRITE_::WriteBlock.
Referenced by EmbedderTest().
|
overridedefault |
|
inline |
Definition at line 133 of file embedder_test.h.
|
static |
Definition at line 680 of file embedder_test.cpp.
References FXDIBFormatFromFPDFFormat(), GetCompsFromFormat(), and kInvalid.
Referenced by FPDFViewEmbedderTest::TestRenderPageBitmapWithExternalMemory(), and FPDFViewEmbedderTest::TestRenderPageBitmapWithInternalMemoryAndStride().
|
inlineprotected |
Definition at line 277 of file embedder_test.h.
void EmbedderTest::CloseDocument | ( | ) |
Definition at line 425 of file embedder_test.cpp.
References FORM_DoDocumentAAction(), form_handle(), and FXSYS_memset().
Referenced by TearDown().
|
protected |
Definition at line 887 of file embedder_test.cpp.
|
protected |
Definition at line 706 of file embedder_test.cpp.
References saved_document().
Referenced by VerifySavedDocument(), CPDFSecurityHandlerEmbedderTest::VerifySavedHelloWorldDocumentWithPassword(), and CPDFSecurityHandlerEmbedderTest::VerifySavedModifiedHelloWorldDocumentWithPassword().
Definition at line 729 of file embedder_test.cpp.
References FORM_DoPageAAction(), FORM_OnBeforeClosePage(), FPDF_ClosePage(), and saved_form_handle().
Referenced by VerifySavedDocument(), CPDFSecurityHandlerEmbedderTest::VerifySavedHelloWorldDocumentWithPassword(), and CPDFSecurityHandlerEmbedderTest::VerifySavedModifiedHelloWorldDocumentWithPassword().
|
staticprotected |
Definition at line 808 of file embedder_test.cpp.
References FPDFBitmap_GetHeight(), FPDFBitmap_GetStride(), FPDFBitmap_GetWidth(), EmbedderTestEnvironment::GetInstance(), and EmbedderTestEnvironment::write_pngs().
Referenced by FPDFViewEmbedderTest::TestRenderPageBitmapWithFlags(), FPDFViewEmbedderTest::TestRenderPageBitmapWithMatrix(), FPDFProgressiveRenderEmbedderTest::VerifyRenderingWithColorScheme(), and VerifySavedRendering().
void EmbedderTest::CreateAvail | ( | FX_FILEAVAIL * | file_avail, |
FPDF_FILEACCESS * | file ) |
Definition at line 770 of file embedder_test.cpp.
void EmbedderTest::CreateEmptyDocument | ( | ) |
Definition at line 293 of file embedder_test.cpp.
References CreateEmptyDocumentWithoutFormFillEnvironment().
void EmbedderTest::CreateEmptyDocumentWithoutFormFillEnvironment | ( | ) |
Definition at line 299 of file embedder_test.cpp.
Referenced by CreateEmptyDocument(), and FPDFEditEmbedderTest::CreateNewDocument().
|
inline |
Definition at line 126 of file embedder_test.h.
Referenced by FPDFEditEmbedderTest::CreateNewDocument(), GetFirstPageNum(), GetPageCount(), XFAJSEmbedderTest::GetXFADocument(), CPDFSecurityHandlerEmbedderTest::RemoveTrailerIdFromDocument(), TearDown(), and FPDFProgressiveRenderEmbedderTest::VerifyRenderingWithColorScheme().
void EmbedderTest::DoOpenActions | ( | ) |
Definition at line 491 of file embedder_test.cpp.
References FORM_DoDocumentJSAction(), FORM_DoDocumentOpenAction(), and form_handle().
|
inline |
Definition at line 128 of file embedder_test.h.
Referenced by FPDFFormFillInteractiveEmbedderTest::CheckCanRedo(), FPDFFormFillInteractiveEmbedderTest::CheckCanUndo(), FPDFFormFillInteractiveEmbedderTest::CheckFocusedFieldText(), FPDFFormFillInteractiveEmbedderTest::CheckIsIndexSelected(), FPDFFormFillInteractiveEmbedderTest::CheckSelection(), FPDFFormFillInteractiveEmbedderTest::ClickOnFormFieldAtPoint(), CloseDocument(), CPWLComboBoxEmbedderTest::CreateAndInitializeFormComboboxPDF(), CPWLEditEmbedderTest::CreateAndInitializeFormPDF(), CPWLSpecialButtonEmbedderTest::CreateAndInitializeFormPDF(), DoOpenActions(), FPDFFormFillInteractiveEmbedderTest::DoubleClickOnFormFieldAtPoint(), FPDFFormFillInteractiveEmbedderTest::FocusOnPoint(), FPDFFormFillListBoxFormEmbedderTest::FocusOnPoint(), FPDFFormFillInteractiveEmbedderTest::GetFormTypeAtPoint(), FPDFFormFillInteractiveEmbedderTest::PerformRedo(), FPDFFormFillInteractiveEmbedderTest::PerformUndo(), RenderLoadedPageWithFlags(), FPDFFormFillInteractiveEmbedderTest::SelectAllTextAtPoint(), FPDFFormFillInteractiveEmbedderTest::SelectTextWithKeyboard(), FPDFFormFillInteractiveEmbedderTest::SelectTextWithMouse(), FPDFFormFillActionUriTest::SetFocusOnNthAnnot(), FPDFFormFillInteractiveEmbedderTest::SetIndexSelectedShouldFail(), FPDFFormFillInteractiveEmbedderTest::SetIndexSelectedShouldSucceed(), CPDFSDKBAAnnotTest::SetUpBAAnnot(), and FPDFFormFillInteractiveEmbedderTest::TypeTextIntoTextField().
|
staticprotected |
Definition at line 846 of file embedder_test.cpp.
Referenced by OpenSavedDocumentWithPassword().
|
inline |
Definition at line 116 of file embedder_test.h.
int EmbedderTest::GetFirstPageNum | ( | ) |
Definition at line 497 of file embedder_test.cpp.
References document(), and FPDFAvail_GetFirstPageNum().
int EmbedderTest::GetPageCount | ( | ) |
Definition at line 504 of file embedder_test.cpp.
References document(), and FPDF_GetPageCount().
|
inlineprotected |
Definition at line 278 of file embedder_test.h.
|
staticprotected |
Definition at line 784 of file embedder_test.cpp.
References CRYPT_MD5Start(), FPDFBitmap_GetBuffer(), FPDFBitmap_GetHeight(), FPDFBitmap_GetStride(), and FPDFBitmap_GetWidth().
FPDF_PAGE EmbedderTest::LoadPage | ( | int | page_index | ) |
Definition at line 517 of file embedder_test.cpp.
Referenced by EmbedderTest::ScopedEmbedderTestPage::ScopedEmbedderTestPage(), CPWLComboBoxEmbedderTest::CreateAndInitializeFormComboboxPDF(), CPWLEditEmbedderTest::CreateAndInitializeFormPDF(), CPWLSpecialButtonEmbedderTest::CreateAndInitializeFormPDF(), pdfium::CFWLEditEmbedderTest::CreateAndInitializeFormPDF(), CPDFSecurityHandlerEmbedderTest::OpenAndVerifyHelloWorldDocumentWithPassword(), CPDFSecurityHandlerEmbedderTest::RemoveGoodbyeObject(), FPDFFormFillActionUriTest::SetUp(), FPDFFormFillInteractiveEmbedderTest::SetUp(), CPDFSDKBAAnnotTest::SetUpBAAnnot(), and FPDFProgressiveRenderEmbedderTest::VerifyRenderingWithColorScheme().
FPDF_PAGE EmbedderTest::LoadPageNoEvents | ( | int | page_index | ) |
Definition at line 521 of file embedder_test.cpp.
|
protected |
Definition at line 714 of file embedder_test.cpp.
References FORM_DoPageAAction(), FORM_OnAfterLoadPage(), FPDF_LoadPage(), saved_document(), and saved_form_handle().
Referenced by VerifySavedDocument(), CPDFSecurityHandlerEmbedderTest::VerifySavedHelloWorldDocumentWithPassword(), and CPDFSecurityHandlerEmbedderTest::VerifySavedModifiedHelloWorldDocumentWithPassword().
EmbedderTest::ScopedEmbedderTestPage EmbedderTest::LoadScopedPage | ( | int | page_index | ) |
Definition at line 512 of file embedder_test.cpp.
References EmbedderTest::ScopedEmbedderTestPage::ScopedEmbedderTestPage().
bool EmbedderTest::OpenDocument | ( | const std::string & | filename | ) |
Definition at line 304 of file embedder_test.cpp.
References kDefaultLinearize, and kEnableJavaScript.
Referenced by CPWLComboBoxEmbedderTest::CreateAndInitializeFormComboboxPDF(), CPWLSpecialButtonEmbedderTest::CreateAndInitializeFormPDF(), FPDFFormFillActionUriTest::SetUp(), FPDFFormFillInteractiveEmbedderTest::SetUp(), and CPDFSDKBAAnnotTest::SetUpBAAnnot().
|
protected |
Definition at line 358 of file embedder_test.cpp.
References FPDF_GetFormType(), FPDF_GetPageCount(), FPDF_LoadCustomDocument(), FPDF_LoadXFA(), FPDFAvail_Create(), FPDFAvail_GetDocument(), FPDFAvail_IsDocAvail(), FPDFAvail_IsFormAvail(), FPDFAvail_IsLinearized(), FPDFAvail_IsPageAvail(), FakeFileAccess::GetDownloadHints(), FakeFileAccess::GetFileAccess(), FakeFileAccess::GetFileAvail(), kMustLinearize, FakeFileAccess::SetRequestedDataAvailable(), SetupFormFillEnvironment(), and FakeFileAccess::SetWholeFileAvailable().
bool EmbedderTest::OpenDocumentLinearized | ( | const std::string & | filename | ) |
Definition at line 310 of file embedder_test.cpp.
References kEnableJavaScript, and kMustLinearize.
|
virtual |
Reimplemented in XFAJSEmbedderTest.
Definition at line 329 of file embedder_test.cpp.
References FXSYS_memset(), and TestLoader::GetBlock().
bool EmbedderTest::OpenDocumentWithoutJavaScript | ( | const std::string & | filename | ) |
Definition at line 323 of file embedder_test.cpp.
References kDefaultLinearize, and kDisableJavaScript.
bool EmbedderTest::OpenDocumentWithPassword | ( | const std::string & | filename, |
const char * | password ) |
Definition at line 316 of file embedder_test.cpp.
References kDefaultLinearize, and kEnableJavaScript.
|
protected |
Definition at line 883 of file embedder_test.cpp.
|
protected |
Definition at line 675 of file embedder_test.cpp.
References OpenSavedDocumentWithPassword().
Referenced by VerifySavedDocument().
|
protected |
Definition at line 686 of file embedder_test.cpp.
References FXSYS_memset(), GetBlockFromString(), and saved_document().
Referenced by OpenSavedDocument(), CPDFSecurityHandlerEmbedderTest::VerifySavedHelloWorldDocumentWithPassword(), and CPDFSecurityHandlerEmbedderTest::VerifySavedModifiedHelloWorldDocumentWithPassword().
ScopedFPDFBitmap EmbedderTest::RenderLoadedPage | ( | FPDF_PAGE | page | ) |
Definition at line 568 of file embedder_test.cpp.
ScopedFPDFBitmap EmbedderTest::RenderLoadedPageWithFlags | ( | FPDF_PAGE | page, |
int | flags ) |
Definition at line 572 of file embedder_test.cpp.
References form_handle().
|
static |
Definition at line 608 of file embedder_test.cpp.
|
static |
Definition at line 591 of file embedder_test.cpp.
References FPDF_GetPageHeightF(), FPDF_GetPageWidthF(), FPDFBitmap_Create(), and FPDFPage_HasTransparency().
ScopedFPDFBitmap EmbedderTest::RenderSavedPage | ( | FPDF_PAGE | page | ) |
Definition at line 579 of file embedder_test.cpp.
ScopedFPDFBitmap EmbedderTest::RenderSavedPageWithFlags | ( | FPDF_PAGE | page, |
int | flags ) |
Definition at line 583 of file embedder_test.cpp.
References saved_form_handle().
|
inline |
Definition at line 127 of file embedder_test.h.
Referenced by CloseSavedDocument(), LoadSavedPage(), OpenSavedDocumentWithPassword(), and VerifySavedRendering().
|
inline |
Definition at line 129 of file embedder_test.h.
Referenced by CloseSavedPage(), LoadSavedPage(), and RenderSavedPageWithFlags().
Definition at line 117 of file embedder_test.h.
void EmbedderTest::SetDocumentFromAvail | ( | ) |
Definition at line 766 of file embedder_test.cpp.
|
inline |
Definition at line 121 of file embedder_test.h.
Referenced by FPDFFormFillActionUriTestVersion2::SetUp(), and FPDFFormFillTextFormEmbedderTestVersion2::SetUp().
void EmbedderTest::SetInitialFormFieldHighlight | ( | FPDF_FORMHANDLE | form | ) |
Definition at line 563 of file embedder_test.cpp.
References FPDF_SetFormFieldHighlightAlpha(), and FPDF_SetFormFieldHighlightColor().
Referenced by SetupFormFillEnvironment().
|
override |
Definition at line 276 of file embedder_test.cpp.
References FSDK_SetUnSpObjProcessHandler(), _UNSUPPORT_INFO::FSDK_UnSupport_Handler, FXSYS_memset(), and _UNSUPPORT_INFO::version.
Referenced by CFX_WindowsRenderDeviceTest::SetUp(), CPDFSDKBAAnnotTest::SetUp(), CPWLComboBoxEmbedderTest::SetUp(), CPWLEditEmbedderTest::SetUp(), CPWLSpecialButtonEmbedderTest::SetUp(), ExternalEngineEmbedderTest::SetUp(), FPDFFormFillActionUriTest::SetUp(), FPDFFormFillInteractiveEmbedderTest::SetUp(), pdfium::CFWLEditEmbedderTest::SetUp(), and XFAJSEmbedderTest::SetUp().
|
protected |
Definition at line 436 of file embedder_test.cpp.
References _IPDF_JsPlatform::app_alert, _FPDF_FORMFILLINFO::FFI_DoGoToAction, _FPDF_FORMFILLINFO::FFI_DoURIAction, _FPDF_FORMFILLINFO::FFI_DoURIActionWithKeyboardModifier, _FPDF_FORMFILLINFO::FFI_ExecuteNamedAction, _FPDF_FORMFILLINFO::FFI_GetRotation, _FPDF_FORMFILLINFO::FFI_Invalidate, _FPDF_FORMFILLINFO::FFI_KillTimer, _FPDF_FORMFILLINFO::FFI_OnChange, _FPDF_FORMFILLINFO::FFI_OnFocusChange, _FPDF_FORMFILLINFO::FFI_OutputSelectedRect, _FPDF_FORMFILLINFO::FFI_SetCursor, _FPDF_FORMFILLINFO::FFI_SetTextFieldFocus, _FPDF_FORMFILLINFO::FFI_SetTimer, FPDFDOC_InitFormFillEnvironment(), FXSYS_memset(), kEnableJavaScript, _FPDF_FORMFILLINFO::m_pJsPlatform, SetInitialFormFieldHighlight(), _FPDF_FORMFILLINFO::version, and _IPDF_JsPlatform::version.
Referenced by OpenDocumentHelper().
|
protected |
Definition at line 761 of file embedder_test.cpp.
|
override |
Definition at line 284 of file embedder_test.cpp.
References CloseDocument(), and document().
Referenced by CFX_WindowsRenderDeviceTest::TearDown(), CPDFSDKBAAnnotTest::TearDown(), CPWLComboBoxEmbedderTest::TearDown(), CPWLEditEmbedderTest::TearDown(), CPWLSpecialButtonEmbedderTest::TearDown(), ExternalEngineEmbedderTest::TearDown(), FPDFFormFillActionUriTest::TearDown(), FPDFFormFillInteractiveEmbedderTest::TearDown(), FXGETextEmbedderTest::TearDown(), pdfium::CFWLEditEmbedderTest::TearDown(), and XFAJSEmbedderTest::TearDown().
Definition at line 542 of file embedder_test.cpp.
Referenced by CPDFSecurityHandlerEmbedderTest::OpenAndVerifyHelloWorldDocumentWithPassword(), CPDFSecurityHandlerEmbedderTest::RemoveGoodbyeObject(), CPDFSDKBAAnnotTest::TearDown(), CPWLComboBoxEmbedderTest::TearDown(), CPWLEditEmbedderTest::TearDown(), CPWLSpecialButtonEmbedderTest::TearDown(), FPDFFormFillActionUriTest::TearDown(), FPDFFormFillInteractiveEmbedderTest::TearDown(), pdfium::CFWLEditEmbedderTest::TearDown(), and FPDFProgressiveRenderEmbedderTest::VerifyRenderingWithColorScheme().
Definition at line 546 of file embedder_test.cpp.
|
protected |
Definition at line 753 of file embedder_test.cpp.
References CloseSavedDocument(), CloseSavedPage(), LoadSavedPage(), OpenSavedDocument(), and VerifySavedRendering().
|
protected |
Definition at line 742 of file embedder_test.cpp.
References CompareBitmap(), and saved_document().
Referenced by VerifySavedDocument().
|
staticprotected |
Definition at line 802 of file embedder_test.cpp.
References BitmapSaver::WriteBitmapToPng().