summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfformfill_embeddertest.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-05-31 10:29:25 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-06-01 16:15:05 +0000
commitfb7021ce035587c460c0ed91584ca05999e60ddd (patch)
treee97ae30e1f37acedab88d8eb027964e6c9c6e5e3 /fpdfsdk/fpdfformfill_embeddertest.cpp
parent19cda483c13d978c43eb5bebe1b7f803161864bb (diff)
downloadpdfium-fb7021ce035587c460c0ed91584ca05999e60ddd.tar.xz
Be less trusting of MaybeLocal<> return types from V8 To* methods.
Calling ToLocalChecked() will crash otherwise. Bug: 707673 Change-Id: I66a5b36d8cf1710a725e30c2d14a195d08ef25a4 Reviewed-on: https://pdfium-review.googlesource.com/6130 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdfformfill_embeddertest.cpp')
-rw-r--r--fpdfsdk/fpdfformfill_embeddertest.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/fpdfsdk/fpdfformfill_embeddertest.cpp b/fpdfsdk/fpdfformfill_embeddertest.cpp
index 631a6a2e7c..8718a43d83 100644
--- a/fpdfsdk/fpdfformfill_embeddertest.cpp
+++ b/fpdfsdk/fpdfformfill_embeddertest.cpp
@@ -201,6 +201,24 @@ TEST_F(FPDFFormFillEmbeddertest, BUG_679649) {
EXPECT_EQ(0u, alerts.size());
}
+TEST_F(FPDFFormFillEmbeddertest, BUG_707673) {
+ EmbedderTestTimerHandlingDelegate delegate;
+ SetDelegate(&delegate);
+
+ EXPECT_TRUE(OpenDocument("bug_707673.pdf"));
+ FPDF_PAGE page = LoadPage(0);
+ EXPECT_TRUE(page);
+
+ DoOpenActions();
+ FORM_OnLButtonDown(form_handle(), page, 0, 140, 590);
+ FORM_OnLButtonUp(form_handle(), page, 0, 140, 590);
+ delegate.AdvanceTime(1000);
+ UnloadPage(page);
+
+ const auto& alerts = delegate.GetAlerts();
+ EXPECT_EQ(0u, alerts.size());
+}
+
#endif // PDF_ENABLE_V8
TEST_F(FPDFFormFillEmbeddertest, FormText) {