summaryrefslogtreecommitdiff
path: root/testing/basic_embeddertest.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-01-15 16:31:51 -0800
committerTom Sepez <tsepez@chromium.org>2015-01-15 16:31:51 -0800
commitd0edcea1a1b22813f593022ca29fca79074757bf (patch)
treef595d536595cafac145a92ebeb3540f4b383b8a1 /testing/basic_embeddertest.cpp
parentf061e44695fc438f3fc9877f5bf8f0f8397ed186 (diff)
downloadpdfium-d0edcea1a1b22813f593022ca29fca79074757bf.tar.xz
Create first pdfium embedder test.
BUG=https://code.google.com/p/pdfium/issues/detail?id=62 R=jam@chromium.org Review URL: https://codereview.chromium.org/827733006
Diffstat (limited to 'testing/basic_embeddertest.cpp')
-rw-r--r--testing/basic_embeddertest.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/testing/basic_embeddertest.cpp b/testing/basic_embeddertest.cpp
new file mode 100644
index 0000000000..210fabd71a
--- /dev/null
+++ b/testing/basic_embeddertest.cpp
@@ -0,0 +1,19 @@
+// Copyright (c) 2015 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "embedder_test.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+class BasicEmbeddertest : public EmbedderTest {
+};
+
+TEST_F(BasicEmbeddertest, GetPageCount) {
+ EXPECT_TRUE(OpenDocument("testing/resources/about_blank.pdf"));
+ EXPECT_EQ(1, GetPageCount());
+}
+
+TEST_F(BasicEmbeddertest, GetFirstPageNum) {
+ EXPECT_TRUE(OpenDocument("testing/resources/about_blank.pdf"));
+ EXPECT_EQ(0, GetFirstPageNum());
+}