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 "../../testing/embedder_test.h" | 8 #include "../../testing/embedder_test.h" |
9 #include "../../fpdfsdk/include/fpdfview.h" | 9 #include "../../fpdfsdk/include/fpdfview.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 dest = FPDF_GetNamedDestByName(document(), "WrongType"); | 173 dest = FPDF_GetNamedDestByName(document(), "WrongType"); |
174 EXPECT_EQ(nullptr, dest); | 174 EXPECT_EQ(nullptr, dest); |
175 | 175 |
176 // No such destination in either Dest NameTree or dictionary. | 176 // No such destination in either Dest NameTree or dictionary. |
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, Crashers) { | 182 TEST_F(FPDFViewEmbeddertest, Crashers) { |
183 EXPECT_TRUE(OpenDocument("testing/resources/bug_451830.pdf")); | 183 // XFA branch detects this document as bad. |
| 184 EXPECT_FALSE(OpenDocument("testing/resources/bug_451830.pdf")); |
184 } | 185 } |
OLD | NEW |