OLD | NEW |
1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 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/fpdfapi/parser/cpdf_array.h" | 5 #include "core/fpdfapi/parser/cpdf_array.h" |
| 6 #include "core/fpdfapi/parser/cpdf_name.h" |
6 #include "core/fpdfapi/parser/cpdf_null.h" | 7 #include "core/fpdfapi/parser/cpdf_null.h" |
7 #include "core/fpdfapi/parser/cpdf_name.h" | |
8 #include "core/fpdfapi/parser/cpdf_number.h" | 8 #include "core/fpdfapi/parser/cpdf_number.h" |
9 #include "core/fpdfdoc/cpdf_dest.h" | 9 #include "core/fpdfdoc/cpdf_dest.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
11 #include "testing/test_support.h" | 11 #include "testing/test_support.h" |
12 #include "third_party/base/ptr_util.h" | 12 #include "third_party/base/ptr_util.h" |
13 | 13 |
14 TEST(cpdf_dest, GetXYZ) { | 14 TEST(cpdf_dest, GetXYZ) { |
15 bool hasX; | 15 bool hasX; |
16 bool hasY; | 16 bool hasY; |
17 bool hasZoom; | 17 bool hasZoom; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 // Set values to null. | 52 // Set values to null. |
53 array->SetNewAt<CPDF_Null>(2); | 53 array->SetNewAt<CPDF_Null>(2); |
54 array->SetNewAt<CPDF_Null>(3); | 54 array->SetNewAt<CPDF_Null>(3); |
55 array->SetNewAt<CPDF_Null>(4); | 55 array->SetNewAt<CPDF_Null>(4); |
56 dest = pdfium::MakeUnique<CPDF_Dest>(array.get()); | 56 dest = pdfium::MakeUnique<CPDF_Dest>(array.get()); |
57 EXPECT_TRUE(dest->GetXYZ(&hasX, &hasY, &hasZoom, &x, &y, &zoom)); | 57 EXPECT_TRUE(dest->GetXYZ(&hasX, &hasY, &hasZoom, &x, &y, &zoom)); |
58 EXPECT_FALSE(hasX); | 58 EXPECT_FALSE(hasX); |
59 EXPECT_FALSE(hasY); | 59 EXPECT_FALSE(hasY); |
60 EXPECT_FALSE(hasZoom); | 60 EXPECT_FALSE(hasZoom); |
61 } | 61 } |
OLD | NEW |