summaryrefslogtreecommitdiff
path: root/xfa/fwl/cfwl_edit_embeddertest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fwl/cfwl_edit_embeddertest.cpp')
-rw-r--r--xfa/fwl/cfwl_edit_embeddertest.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/xfa/fwl/cfwl_edit_embeddertest.cpp b/xfa/fwl/cfwl_edit_embeddertest.cpp
index c1575689eb..59a4ca5947 100644
--- a/xfa/fwl/cfwl_edit_embeddertest.cpp
+++ b/xfa/fwl/cfwl_edit_embeddertest.cpp
@@ -6,12 +6,14 @@
#include "public/fpdf_formfill.h"
#include "public/fpdf_fwlevent.h"
#include "testing/embedder_test.h"
+#include "testing/embedder_test_timer_handling_delegate.h"
#include "testing/gtest/include/gtest/gtest.h"
class CFWLEditEmbeddertest : public EmbedderTest {
protected:
void SetUp() override {
EmbedderTest::SetUp();
+ SetDelegate(&delegate_);
CreateAndInitializeFormPDF();
}
@@ -27,11 +29,21 @@ class CFWLEditEmbeddertest : public EmbedderTest {
}
FPDF_PAGE page() const { return page_; }
+ EmbedderTestTimerHandlingDelegate delegate() const { return delegate_; }
private:
FPDF_PAGE page_;
+ EmbedderTestTimerHandlingDelegate delegate_;
};
+TEST_F(CFWLEditEmbeddertest, Trivial) {
+ ASSERT_EQ(1u, delegate().GetAlerts().size());
+ auto alert = delegate().GetAlerts()[0];
+ EXPECT_STREQ(L"PDFium", alert.title.c_str());
+ EXPECT_STREQ(L"The value you entered for Text Field is invalid.",
+ alert.message.c_str());
+}
+
TEST_F(CFWLEditEmbeddertest, LeftClickMouseSelection) {
FORM_OnLButtonDown(form_handle(), page(), 0, 115, 58);
for (size_t i = 0; i < 10; ++i)