Make a bunch of JBig2 classes independent of CJBig2_Object.
[pdfium.git] / testing / embedder_test.h
index ea93131..4bd9d97 100644 (file)
@@ -7,11 +7,10 @@
 
 #include <string>
 
-#include "../core/include/fxcrt/fx_system.h"
-#include "../fpdfsdk/include/fpdf_dataavail.h"
-#include "../fpdfsdk/include/fpdf_ext.h"
-#include "../fpdfsdk/include/fpdfformfill.h"
-#include "../fpdfsdk/include/fpdfview.h"
+#include "../public/fpdf_dataavail.h"
+#include "../public/fpdf_ext.h"
+#include "../public/fpdf_formfill.h"
+#include "../public/fpdfview.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "v8/include/v8.h"
 
@@ -26,16 +25,24 @@ class EmbedderTest : public ::testing::Test,
  public:
   class Delegate {
    public:
-    virtual ~Delegate() { }
+    virtual ~Delegate() {}
 
     // Equivalent to UNSUPPORT_INFO::FSDK_UnSupport_Handler().
-    virtual void UnsupportedHandler(int type) { }
+    virtual void UnsupportedHandler(int type) {}
 
     // Equivalent to IPDF_JSPLATFORM::app_alert().
-    virtual int Alert(FPDF_WIDESTRING message, FPDF_WIDESTRING title,
-                      int type, int icon) {
+    virtual int Alert(FPDF_WIDESTRING message,
+                      FPDF_WIDESTRING title,
+                      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 +88,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_;
@@ -89,9 +97,15 @@ class EmbedderTest : public ::testing::Test,
 
  private:
   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 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_
-