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 <string> |
| 6 |
5 #include "core/include/fxcrt/fx_string.h" | 7 #include "core/include/fxcrt/fx_string.h" |
6 #include "public/fpdf_doc.h" | 8 #include "public/fpdf_doc.h" |
7 #include "public/fpdfview.h" | 9 #include "public/fpdfview.h" |
8 #include "testing/embedder_test.h" | 10 #include "testing/embedder_test.h" |
9 #include "testing/fx_string_testhelpers.h" | 11 #include "testing/fx_string_testhelpers.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
11 #include "testing/test_support.h" | 13 #include "testing/test_support.h" |
12 | 14 |
13 class FPDFDocEmbeddertest : public EmbedderTest {}; | 15 class FPDFDocEmbeddertest : public EmbedderTest {}; |
14 | 16 |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 // Check circular bookmarks will not cause infinite loop. | 131 // Check circular bookmarks will not cause infinite loop. |
130 TEST_F(FPDFDocEmbeddertest, FindBookmarks_bug420) { | 132 TEST_F(FPDFDocEmbeddertest, FindBookmarks_bug420) { |
131 // Open a file with circular bookmarks. | 133 // Open a file with circular bookmarks. |
132 EXPECT_TRUE(OpenDocument("bookmarks_circular.pdf")); | 134 EXPECT_TRUE(OpenDocument("bookmarks_circular.pdf")); |
133 | 135 |
134 // Try to find a title. | 136 // Try to find a title. |
135 std::unique_ptr<unsigned short, pdfium::FreeDeleter> title = | 137 std::unique_ptr<unsigned short, pdfium::FreeDeleter> title = |
136 GetFPDFWideString(L"anything"); | 138 GetFPDFWideString(L"anything"); |
137 EXPECT_EQ(nullptr, FPDFBookmark_Find(document(), title.get())); | 139 EXPECT_EQ(nullptr, FPDFBookmark_Find(document(), title.get())); |
138 } | 140 } |
OLD | NEW |