| 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 "core/include/fxcrt/fx_basic.h" | 5 #include "core/include/fxcrt/fx_basic.h" |
| 6 #include "public/fpdf_text.h" | 6 #include "public/fpdf_text.h" |
| 7 #include "public/fpdfview.h" | 7 #include "public/fpdfview.h" |
| 8 #include "testing/embedder_test.h" | 8 #include "testing/embedder_test.h" |
| 9 #include "testing/gtest/include/gtest/gtest.h" |
| 9 #include "testing/test_support.h" | 10 #include "testing/test_support.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | |
| 11 | 11 |
| 12 namespace { | 12 namespace { |
| 13 | 13 |
| 14 bool check_unsigned_shorts(const char* expected, | 14 bool check_unsigned_shorts(const char* expected, |
| 15 const unsigned short* actual, | 15 const unsigned short* actual, |
| 16 size_t length) { | 16 size_t length) { |
| 17 if (length > strlen(expected) + 1) { | 17 if (length > strlen(expected) + 1) { |
| 18 return false; | 18 return false; |
| 19 } | 19 } |
| 20 for (size_t i = 0; i < length; ++i) { | 20 for (size_t i = 0; i < length; ++i) { |
| (...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 16, 16, 16, 16, 16, 16, 16, 16, 16, 16}; | 382 16, 16, 16, 16, 16, 16, 16, 16, 16, 16}; |
| 383 | 383 |
| 384 int count = FPDFText_CountChars(textpage); | 384 int count = FPDFText_CountChars(textpage); |
| 385 ASSERT_EQ(FX_ArraySize(kExpectedFontsSizes), count); | 385 ASSERT_EQ(FX_ArraySize(kExpectedFontsSizes), count); |
| 386 for (int i = 0; i < count; ++i) | 386 for (int i = 0; i < count; ++i) |
| 387 EXPECT_EQ(kExpectedFontsSizes[i], FPDFText_GetFontSize(textpage, i)) << i; | 387 EXPECT_EQ(kExpectedFontsSizes[i], FPDFText_GetFontSize(textpage, i)) << i; |
| 388 | 388 |
| 389 FPDFText_ClosePage(textpage); | 389 FPDFText_ClosePage(textpage); |
| 390 UnloadPage(page); | 390 UnloadPage(page); |
| 391 } | 391 } |
| OLD | NEW |