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, CPDFSDK_AnnotIteratorTest, CPDFSDK_AnnotIteratorTest, CPDFSDK_BAAnnotTest, CPDFSDK_BAAnnotTest, 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, FPDFEditPathEmbedderTest, FPDFEditPathEmbedderTest, 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 |
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_number) |
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 35 of file embedder_test.h.
|
protected |
Definition at line 218 of file embedder_test.h.
|
strong |
Enumerator | |
---|---|
kDisableJavaScript | |
kEnableJavaScript |
Definition at line 42 of file embedder_test.h.
|
strong |
Enumerator | |
---|---|
kDefaultLinearize | |
kMustLinearize |
Definition at line 41 of file embedder_test.h.
EmbedderTest::EmbedderTest | ( | ) |
Definition at line 265 of file embedder_test.cpp.
References EmbedderTest(), FPDF_FILEWRITE_::version, and FPDF_FILEWRITE_::WriteBlock.
Referenced by EmbedderTest().
|
virtualdefault |
|
inline |
Definition at line 114 of file embedder_test.h.
|
static |
Definition at line 671 of file embedder_test.cpp.
Referenced by FPDFViewEmbedderTest::TestRenderPageBitmapWithExternalMemory(), and FPDFViewEmbedderTest::TestRenderPageBitmapWithInternalMemoryAndStride().
|
inlineprotected |
Definition at line 245 of file embedder_test.h.
void EmbedderTest::CloseDocument | ( | ) |
Definition at line 423 of file embedder_test.cpp.
References FORM_DoDocumentAAction(), and form_handle().
Referenced by TearDown().
|
protected |
Definition at line 886 of file embedder_test.cpp.
|
protected |
Definition at line 705 of file embedder_test.cpp.
Referenced by VerifySavedDocument(), CPDFSecurityHandlerEmbedderTest::VerifySavedHelloWorldDocumentWithPassword(), and CPDFSecurityHandlerEmbedderTest::VerifySavedModifiedHelloWorldDocumentWithPassword().
Definition at line 728 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 807 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 769 of file embedder_test.cpp.
void EmbedderTest::CreateEmptyDocument | ( | ) |
Definition at line 291 of file embedder_test.cpp.
References CreateEmptyDocumentWithoutFormFillEnvironment().
void EmbedderTest::CreateEmptyDocumentWithoutFormFillEnvironment | ( | ) |
Definition at line 297 of file embedder_test.cpp.
Referenced by CreateEmptyDocument(), and FPDFEditEmbedderTest::CreateNewDocument().
|
inline |
Definition at line 107 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 489 of file embedder_test.cpp.
References FORM_DoDocumentJSAction(), FORM_DoDocumentOpenAction(), and form_handle().
|
inline |
Definition at line 109 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(), CPDFSDK_BAAnnotTest::SetUpBAAnnot(), and FPDFFormFillInteractiveEmbedderTest::TypeTextIntoTextField().
|
staticprotected |
Definition at line 845 of file embedder_test.cpp.
Referenced by OpenSavedDocumentWithPassword().
|
inline |
Definition at line 97 of file embedder_test.h.
int EmbedderTest::GetFirstPageNum | ( | ) |
Definition at line 495 of file embedder_test.cpp.
References document(), and FPDFAvail_GetFirstPageNum().
int EmbedderTest::GetPageCount | ( | ) |
Definition at line 502 of file embedder_test.cpp.
References document(), and FPDF_GetPageCount().
|
inlineprotected |
Definition at line 246 of file embedder_test.h.
|
staticprotected |
Definition at line 783 of file embedder_test.cpp.
References CRYPT_MD5Finish(), CRYPT_MD5Start(), FPDFBitmap_GetBuffer(), FPDFBitmap_GetHeight(), FPDFBitmap_GetStride(), and FPDFBitmap_GetWidth().
FPDF_PAGE EmbedderTest::LoadPage | ( | int | page_number | ) |
Definition at line 510 of file embedder_test.cpp.
Referenced by CPWLComboBoxEmbedderTest::CreateAndInitializeFormComboboxPDF(), CFWLEditEmbedderTest::CreateAndInitializeFormPDF(), CPWLEditEmbedderTest::CreateAndInitializeFormPDF(), CPWLSpecialButtonEmbedderTest::CreateAndInitializeFormPDF(), CPDFSecurityHandlerEmbedderTest::OpenAndVerifyHelloWorldDocumentWithPassword(), CPDFSecurityHandlerEmbedderTest::RemoveGoodbyeObject(), FPDFFormFillActionUriTest::SetUp(), FPDFFormFillInteractiveEmbedderTest::SetUp(), CPDFSDK_BAAnnotTest::SetUpBAAnnot(), and FPDFProgressiveRenderEmbedderTest::VerifyRenderingWithColorScheme().
FPDF_PAGE EmbedderTest::LoadPageNoEvents | ( | int | page_number | ) |
Definition at line 514 of file embedder_test.cpp.
|
protected |
Definition at line 713 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().
bool EmbedderTest::OpenDocument | ( | const std::string & | filename | ) |
Definition at line 302 of file embedder_test.cpp.
References kDefaultLinearize, and kEnableJavaScript.
Referenced by CPWLComboBoxEmbedderTest::CreateAndInitializeFormComboboxPDF(), CPWLSpecialButtonEmbedderTest::CreateAndInitializeFormPDF(), FPDFFormFillActionUriTest::SetUp(), FPDFFormFillInteractiveEmbedderTest::SetUp(), and CPDFSDK_BAAnnotTest::SetUpBAAnnot().
|
protected |
Definition at line 356 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 308 of file embedder_test.cpp.
References kEnableJavaScript, and kMustLinearize.
|
virtual |
Reimplemented in XFAJSEmbedderTest.
Definition at line 327 of file embedder_test.cpp.
References TestLoader::GetBlock().
bool EmbedderTest::OpenDocumentWithoutJavaScript | ( | const std::string & | filename | ) |
Definition at line 321 of file embedder_test.cpp.
References kDefaultLinearize, and kDisableJavaScript.
bool EmbedderTest::OpenDocumentWithPassword | ( | const std::string & | filename, |
const char * | password ) |
Definition at line 314 of file embedder_test.cpp.
References kDefaultLinearize, and kEnableJavaScript.
|
protected |
Definition at line 882 of file embedder_test.cpp.
|
protected |
Definition at line 666 of file embedder_test.cpp.
References OpenSavedDocumentWithPassword().
Referenced by VerifySavedDocument().
|
protected |
Definition at line 685 of file embedder_test.cpp.
References GetBlockFromString(), and saved_document().
Referenced by OpenSavedDocument(), CPDFSecurityHandlerEmbedderTest::VerifySavedHelloWorldDocumentWithPassword(), and CPDFSecurityHandlerEmbedderTest::VerifySavedModifiedHelloWorldDocumentWithPassword().
ScopedFPDFBitmap EmbedderTest::RenderLoadedPage | ( | FPDF_PAGE | page | ) |
Definition at line 561 of file embedder_test.cpp.
ScopedFPDFBitmap EmbedderTest::RenderLoadedPageWithFlags | ( | FPDF_PAGE | page, |
int | flags ) |
Definition at line 565 of file embedder_test.cpp.
References form_handle().
|
static |
Definition at line 599 of file embedder_test.cpp.
|
static |
Definition at line 584 of file embedder_test.cpp.
References FPDF_GetPageHeightF(), FPDF_GetPageWidthF(), and FPDFPage_HasTransparency().
ScopedFPDFBitmap EmbedderTest::RenderSavedPage | ( | FPDF_PAGE | page | ) |
Definition at line 572 of file embedder_test.cpp.
ScopedFPDFBitmap EmbedderTest::RenderSavedPageWithFlags | ( | FPDF_PAGE | page, |
int | flags ) |
Definition at line 576 of file embedder_test.cpp.
References saved_form_handle().
|
inline |
Definition at line 108 of file embedder_test.h.
Referenced by LoadSavedPage(), and OpenSavedDocumentWithPassword().
|
inline |
Definition at line 110 of file embedder_test.h.
Referenced by CloseSavedPage(), LoadSavedPage(), and RenderSavedPageWithFlags().
Definition at line 98 of file embedder_test.h.
void EmbedderTest::SetDocumentFromAvail | ( | ) |
Definition at line 765 of file embedder_test.cpp.
|
inline |
Definition at line 102 of file embedder_test.h.
Referenced by FPDFFormFillActionUriTestVersion2::SetUp(), and FPDFFormFillTextFormEmbedderTestVersion2::SetUp().
void EmbedderTest::SetInitialFormFieldHighlight | ( | FPDF_FORMHANDLE | form | ) |
Definition at line 556 of file embedder_test.cpp.
References FPDF_SetFormFieldHighlightAlpha(), and FPDF_SetFormFieldHighlightColor().
Referenced by SetupFormFillEnvironment().
|
override |
Definition at line 274 of file embedder_test.cpp.
References FSDK_SetUnSpObjProcessHandler(), _UNSUPPORT_INFO::FSDK_UnSupport_Handler, and _UNSUPPORT_INFO::version.
Referenced by CFWLEditEmbedderTest::SetUp(), CFX_WindowsRenderDeviceTest::SetUp(), CPDFSDK_BAAnnotTest::SetUp(), CPWLComboBoxEmbedderTest::SetUp(), CPWLEditEmbedderTest::SetUp(), CPWLSpecialButtonEmbedderTest::SetUp(), ExternalEngineEmbedderTest::SetUp(), FPDFFormFillActionUriTest::SetUp(), FPDFFormFillInteractiveEmbedderTest::SetUp(), and XFAJSEmbedderTest::SetUp().
|
protected |
Definition at line 434 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(), kEnableJavaScript, _FPDF_FORMFILLINFO::m_pJsPlatform, SetInitialFormFieldHighlight(), _FPDF_FORMFILLINFO::version, and _IPDF_JsPlatform::version.
Referenced by OpenDocumentHelper().
|
protected |
Definition at line 760 of file embedder_test.cpp.
|
override |
Definition at line 282 of file embedder_test.cpp.
References CloseDocument(), and document().
Referenced by CFWLEditEmbedderTest::TearDown(), CFX_WindowsRenderDeviceTest::TearDown(), CPDFSDK_BAAnnotTest::TearDown(), CPWLComboBoxEmbedderTest::TearDown(), CPWLEditEmbedderTest::TearDown(), CPWLSpecialButtonEmbedderTest::TearDown(), ExternalEngineEmbedderTest::TearDown(), FPDFFormFillActionUriTest::TearDown(), FPDFFormFillInteractiveEmbedderTest::TearDown(), FXGETextEmbedderTest::TearDown(), and XFAJSEmbedderTest::TearDown().
Definition at line 535 of file embedder_test.cpp.
Referenced by CPDFSecurityHandlerEmbedderTest::OpenAndVerifyHelloWorldDocumentWithPassword(), CPDFSecurityHandlerEmbedderTest::RemoveGoodbyeObject(), CFWLEditEmbedderTest::TearDown(), CPDFSDK_BAAnnotTest::TearDown(), CPWLComboBoxEmbedderTest::TearDown(), CPWLEditEmbedderTest::TearDown(), CPWLSpecialButtonEmbedderTest::TearDown(), FPDFFormFillActionUriTest::TearDown(), FPDFFormFillInteractiveEmbedderTest::TearDown(), and FPDFProgressiveRenderEmbedderTest::VerifyRenderingWithColorScheme().
Definition at line 539 of file embedder_test.cpp.
|
protected |
Definition at line 752 of file embedder_test.cpp.
References CloseSavedDocument(), CloseSavedPage(), LoadSavedPage(), OpenSavedDocument(), and VerifySavedRendering().
|
protected |
Definition at line 741 of file embedder_test.cpp.
References CompareBitmap().
Referenced by VerifySavedDocument().
|
staticprotected |
Definition at line 801 of file embedder_test.cpp.
References BitmapSaver::WriteBitmapToPng().