diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-06-02 16:51:07 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-06-02 16:51:07 -0700 |
commit | a76f557650dfc95cae5f535d4a1b627a84d2b5f0 (patch) | |
tree | 40de9a298f1e02774dcb6cfb303d629bc97a7ec4 /testing/embedder_test.h | |
parent | b29338d126125d96d63817af1d80a64ea929ffae (diff) | |
download | pdfium-a76f557650dfc95cae5f535d4a1b627a84d2b5f0.tar.xz |
Automated test case for 487928.
Reproducing this bug requires the embedder to fire timers, something the
single-pass pdfium-test binary doesn't do properly at the present. So
we modify the embedder test delegate to allow the immediate triggering
of the same.
Perform some cleanup along the way by removing EmbedderTestDefaultDelegate
-- it buys us nothing over the the no-op one.
And, of course, v8 initialization is busted again, and we need v8 here.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1153213004
Diffstat (limited to 'testing/embedder_test.h')
-rw-r--r-- | testing/embedder_test.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/testing/embedder_test.h b/testing/embedder_test.h index 5cede6c6b4..b0834ddecd 100644 --- a/testing/embedder_test.h +++ b/testing/embedder_test.h @@ -36,6 +36,12 @@ class EmbedderTest : public ::testing::Test, int type, int icon) { return 0; } + + // Equivalent to FPDF_FORMFILLINFO::FFI_SetTimer(). + virtual int SetTimer(int msecs, TimerCallback fn) { return 0; } + + // Equivalent to FPDF_FORMFILLINFO::FFI_KillTimer(). + virtual void KillTimer(int id) { } }; EmbedderTest(); @@ -81,6 +87,7 @@ class EmbedderTest : public ::testing::Test, FX_DOWNLOADHINTS hints_; FPDF_FILEACCESS file_access_; FX_FILEAVAIL file_avail_; + v8::Platform* platform_; v8::StartupData natives_; v8::StartupData snapshot_; TestLoader* loader_; @@ -91,7 +98,9 @@ class EmbedderTest : public ::testing::Test, static void UnsupportedHandlerTrampoline(UNSUPPORT_INFO*, int type); static int AlertTrampoline(IPDF_JSPLATFORM* plaform, FPDF_WIDESTRING message, FPDF_WIDESTRING title, int type, int icon); + static int SetTimerTrampoline(FPDF_FORMFILLINFO* info, int msecs, + TimerCallback fn); + static void KillTimerTrampoline(FPDF_FORMFILLINFO* info, int id); }; #endif // TESTING_EMBEDDER_TEST_H_ - |