summaryrefslogtreecommitdiff
path: root/testing/embedder_test.h
diff options
context:
space:
mode:
Diffstat (limited to 'testing/embedder_test.h')
-rw-r--r--testing/embedder_test.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/testing/embedder_test.h b/testing/embedder_test.h
index 878e50bfdd..be89c2a6cd 100644
--- a/testing/embedder_test.h
+++ b/testing/embedder_test.h
@@ -14,6 +14,7 @@
#include "public/fpdf_formfill.h"
#include "public/fpdf_save.h"
#include "public/fpdfview.h"
+#include "testing/fake_file_access.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/test_support.h"
@@ -116,9 +117,7 @@ class EmbedderTest : public ::testing::Test,
protected:
bool OpenDocumentHelper(const char* password,
bool must_linearize,
- FX_FILEAVAIL* file_avail,
- FX_DOWNLOADHINTS* hints,
- FPDF_FILEACCESS* file_access,
+ FakeFileAccess* network_simulator,
FPDF_DOCUMENT* document,
FPDF_AVAIL* avail,
FPDF_FORMHANDLE* form_handle);
@@ -151,14 +150,14 @@ class EmbedderTest : public ::testing::Test,
void CloseSaved();
void TestAndCloseSaved(int width, int height, const char* md5);
+ void SetWholeFileAvailable();
+
Delegate* delegate_;
std::unique_ptr<Delegate> default_delegate_;
FPDF_DOCUMENT document_;
FPDF_FORMHANDLE form_handle_;
FPDF_AVAIL avail_;
- FX_DOWNLOADHINTS hints_;
- FPDF_FILEACCESS file_access_;
- FX_FILEAVAIL file_avail_;
+ FPDF_FILEACCESS file_access_; // must outlive avail_.
#ifdef PDF_ENABLE_V8
v8::Platform* platform_;
#endif // PDF_ENABLE_V8
@@ -172,6 +171,10 @@ class EmbedderTest : public ::testing::Test,
FPDF_PAGE m_SavedPage;
FPDF_FORMHANDLE m_SavedForm;
FPDF_AVAIL m_SavedAvail;
+ FPDF_FILEACCESS saved_file_access_; // must outlive m_SavedAvail.
+ std::unique_ptr<FakeFileAccess> fake_file_access_; // must outlive avail_.
+ std::unique_ptr<FakeFileAccess>
+ saved_fake_file_access_; // must outlive m_SavedAvail.
private:
static void UnsupportedHandlerTrampoline(UNSUPPORT_INFO*, int type);