summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/xfa_utils_unittest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/parser/xfa_utils_unittest.cpp')
-rw-r--r--xfa/fxfa/parser/xfa_utils_unittest.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/xfa/fxfa/parser/xfa_utils_unittest.cpp b/xfa/fxfa/parser/xfa_utils_unittest.cpp
index e4dd09419e..1898a797ec 100644
--- a/xfa/fxfa/parser/xfa_utils_unittest.cpp
+++ b/xfa/fxfa/parser/xfa_utils_unittest.cpp
@@ -273,3 +273,12 @@ TEST_F(XFANodeIteratorTest, ChildAsRootNext) {
EXPECT_EQ(child6(), iter.MoveToNext());
EXPECT_EQ(nullptr, iter.MoveToNext());
}
+
+TEST(XFAUtilsTest, GetAttributeByName) {
+ EXPECT_EQ(nullptr, XFA_GetAttributeByName(L""));
+ EXPECT_EQ(nullptr, XFA_GetAttributeByName(L"clams"));
+ EXPECT_EQ(XFA_ATTRIBUTE_H, XFA_GetAttributeByName(L"h")->eName);
+ EXPECT_EQ(XFA_ATTRIBUTE_Short, XFA_GetAttributeByName(L"short")->eName);
+ EXPECT_EQ(XFA_ATTRIBUTE_DecipherOnly,
+ XFA_GetAttributeByName(L"decipherOnly")->eName);
+}