| OLD | NEW |
| 1 // Copyright 2015 PDFium Authors. All rights reserved. | 1 // Copyright 2015 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <limits> | 5 #include <limits> |
| 6 #include <string> | 6 #include <string> |
| 7 | 7 |
| 8 #include "../../public/fpdfview.h" | |
| 9 #include "../../testing/embedder_test.h" | 8 #include "../../testing/embedder_test.h" |
| 10 #include "fpdfview_c_api_test.h" | 9 #include "fpdfview_c_api_test.h" |
| 10 #include "public/fpdfview.h" |
| 11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 12 | 12 |
| 13 TEST(fpdf, CApiTest) { | 13 TEST(fpdf, CApiTest) { |
| 14 EXPECT_TRUE(CheckPDFiumCApi()); | 14 EXPECT_TRUE(CheckPDFiumCApi()); |
| 15 } | 15 } |
| 16 | 16 |
| 17 class FPDFViewEmbeddertest : public EmbedderTest {}; | 17 class FPDFViewEmbeddertest : public EmbedderTest {}; |
| 18 | 18 |
| 19 TEST_F(FPDFViewEmbeddertest, Document) { | 19 TEST_F(FPDFViewEmbeddertest, Document) { |
| 20 EXPECT_TRUE(OpenDocument("testing/resources/about_blank.pdf")); | 20 EXPECT_TRUE(OpenDocument("testing/resources/about_blank.pdf")); |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 EXPECT_TRUE(OpenDocument("testing/resources/bug_452455.pdf")); | 192 EXPECT_TRUE(OpenDocument("testing/resources/bug_452455.pdf")); |
| 193 FPDF_PAGE page = LoadPage(0); | 193 FPDF_PAGE page = LoadPage(0); |
| 194 EXPECT_NE(nullptr, page); | 194 EXPECT_NE(nullptr, page); |
| 195 UnloadPage(page); | 195 UnloadPage(page); |
| 196 } | 196 } |
| 197 | 197 |
| 198 TEST_F(FPDFViewEmbeddertest, Crasher_454695) { | 198 TEST_F(FPDFViewEmbeddertest, Crasher_454695) { |
| 199 // Document is damanged and can't be opened. | 199 // Document is damanged and can't be opened. |
| 200 EXPECT_FALSE(OpenDocument("testing/resources/bug_454695.pdf")); | 200 EXPECT_FALSE(OpenDocument("testing/resources/bug_454695.pdf")); |
| 201 } | 201 } |
| OLD | NEW |