xref: /aosp_15_r20/external/pdfium/testing/embedder_test_mock_delegate.h (revision 3ac0a46f773bac49fa9476ec2b1cf3f8da5ec3a4)
1 // Copyright 2015 The PDFium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef TESTING_EMBEDDER_TEST_MOCK_DELEGATE_H_
6 #define TESTING_EMBEDDER_TEST_MOCK_DELEGATE_H_
7 
8 #include "testing/embedder_test.h"
9 #include "testing/gmock/include/gmock/gmock.h"
10 
11 class EmbedderTestMockDelegate : public EmbedderTest::Delegate {
12  public:
13   MOCK_METHOD1(UnsupportedHandler, void(int type));
14   MOCK_METHOD4(
15       Alert,
16       int(FPDF_WIDESTRING message, FPDF_WIDESTRING title, int type, int icon));
17   MOCK_METHOD2(SetTimer, int(int msecs, TimerCallback fn));
18   MOCK_METHOD1(KillTimer, void(int msecs));
19   MOCK_METHOD1(DoURIAction, void(FPDF_BYTESTRING uri));
20   MOCK_METHOD5(DoGoToAction,
21                void(FPDF_FORMFILLINFO* info,
22                     int page_index,
23                     int zoom_mode,
24                     float* pos_array,
25                     int array_size));
26   MOCK_METHOD3(OnFocusChange,
27                void(FPDF_FORMFILLINFO* info,
28                     FPDF_ANNOTATION annot,
29                     int page_index));
30   MOCK_METHOD3(DoURIActionWithKeyboardModifier,
31                void(FPDF_FORMFILLINFO* info,
32                     FPDF_BYTESTRING uri,
33                     int modifiers));
34 };
35 
36 #endif  // TESTING_EMBEDDER_TEST_MOCK_DELEGATE_H_
37