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" | 8 #include "../../public/fpdfview.h" |
9 #include "../../testing/embedder_test.h" | 9 #include "../../testing/embedder_test.h" |
10 #include "fpdfview_c_api_test.h" | 10 #include "fpdfview_c_api_test.h" |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 dest = FPDF_GetNamedDestByName(document(), "Bogus"); | 177 dest = FPDF_GetNamedDestByName(document(), "Bogus"); |
178 EXPECT_EQ(nullptr, dest); | 178 EXPECT_EQ(nullptr, dest); |
179 } | 179 } |
180 | 180 |
181 // The following tests pass if the document opens without crashing. | 181 // The following tests pass if the document opens without crashing. |
182 TEST_F(FPDFViewEmbeddertest, Crasher_113) { | 182 TEST_F(FPDFViewEmbeddertest, Crasher_113) { |
183 EXPECT_TRUE(OpenDocument("testing/resources/bug_113.pdf")); | 183 EXPECT_TRUE(OpenDocument("testing/resources/bug_113.pdf")); |
184 } | 184 } |
185 | 185 |
186 TEST_F(FPDFViewEmbeddertest, Crasher_451830) { | 186 TEST_F(FPDFViewEmbeddertest, Crasher_451830) { |
187 EXPECT_TRUE(OpenDocument("testing/resources/bug_451830.pdf")); | 187 EXPECT_FALSE(OpenDocument("testing/resources/bug_451830.pdf")); |
188 } | 188 } |
189 | 189 |
190 TEST_F(FPDFViewEmbeddertest, Crasher_452455) { | 190 TEST_F(FPDFViewEmbeddertest, Crasher_452455) { |
191 EXPECT_TRUE(OpenDocument("testing/resources/bug_452455.pdf")); | 191 EXPECT_TRUE(OpenDocument("testing/resources/bug_452455.pdf")); |
192 FPDF_PAGE page = LoadPage(0); | 192 FPDF_PAGE page = LoadPage(0); |
193 EXPECT_NE(nullptr, page); | 193 EXPECT_NE(nullptr, page); |
194 UnloadPage(page); | 194 UnloadPage(page); |
195 } | 195 } |
196 | 196 |
197 TEST_F(FPDFViewEmbeddertest, Crasher3) { | 197 TEST_F(FPDFViewEmbeddertest, Crasher3) { |
198 EXPECT_TRUE(OpenDocument("testing/resources/bug_454695.pdf")); | 198 EXPECT_FALSE(OpenDocument("testing/resources/bug_454695.pdf")); |
199 } | 199 } |
OLD | NEW |