Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(251)

Side by Side Diff: core/fpdfdoc/cpdf_formfield_unittest.cpp

Issue 2374383003: Move core/fpdfdoc/include to core/fpdfdoc (Closed)
Patch Set: Rebase to master Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « core/fpdfdoc/cpdf_formfield.cpp ('k') | core/fpdfdoc/cpdf_iconfit.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/fpdf_parser/cpdf_dictionary.h" 5 #include "core/fpdfapi/fpdf_parser/cpdf_dictionary.h"
6 #include "core/fpdfapi/fpdf_parser/cpdf_indirect_object_holder.h" 6 #include "core/fpdfapi/fpdf_parser/cpdf_indirect_object_holder.h"
7 #include "core/fpdfdoc/include/cpdf_formfield.h" 7 #include "core/fpdfdoc/cpdf_formfield.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 TEST(cpdf_formfield, FPDF_GetFullName) { 10 TEST(cpdf_formfield, FPDF_GetFullName) {
11 CFX_WideString name = FPDF_GetFullName(nullptr); 11 CFX_WideString name = FPDF_GetFullName(nullptr);
12 EXPECT_TRUE(name.IsEmpty()); 12 EXPECT_TRUE(name.IsEmpty());
13 13
14 CPDF_IndirectObjectHolder obj_holder; 14 CPDF_IndirectObjectHolder obj_holder;
15 CPDF_Dictionary* root = 15 CPDF_Dictionary* root =
16 new CPDF_Dictionary(CFX_WeakPtr<CFX_ByteStringPool>()); 16 new CPDF_Dictionary(CFX_WeakPtr<CFX_ByteStringPool>());
17 obj_holder.AddIndirectObject(root); 17 obj_holder.AddIndirectObject(root);
(...skipping 26 matching lines...) Expand all
44 dict3->SetReferenceFor("Parent", &obj_holder, root->GetObjNum()); 44 dict3->SetReferenceFor("Parent", &obj_holder, root->GetObjNum());
45 name = FPDF_GetFullName(root); 45 name = FPDF_GetFullName(root);
46 EXPECT_STREQ("qux.bar.foo", name.UTF8Encode().c_str()); 46 EXPECT_STREQ("qux.bar.foo", name.UTF8Encode().c_str());
47 name = FPDF_GetFullName(dict1); 47 name = FPDF_GetFullName(dict1);
48 EXPECT_STREQ("foo.qux.bar", name.UTF8Encode().c_str()); 48 EXPECT_STREQ("foo.qux.bar", name.UTF8Encode().c_str());
49 name = FPDF_GetFullName(dict2); 49 name = FPDF_GetFullName(dict2);
50 EXPECT_STREQ("bar.foo.qux", name.UTF8Encode().c_str()); 50 EXPECT_STREQ("bar.foo.qux", name.UTF8Encode().c_str());
51 name = FPDF_GetFullName(dict3); 51 name = FPDF_GetFullName(dict3);
52 EXPECT_STREQ("bar.foo.qux", name.UTF8Encode().c_str()); 52 EXPECT_STREQ("bar.foo.qux", name.UTF8Encode().c_str());
53 } 53 }
OLDNEW
« no previous file with comments | « core/fpdfdoc/cpdf_formfield.cpp ('k') | core/fpdfdoc/cpdf_iconfit.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698