summaryrefslogtreecommitdiff
path: root/xfa/fxfa/fm2js/cxfa_fmparser_unittest.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-02-20 22:05:59 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-02-20 22:05:59 +0000
commite76345ec2780ec13cc99b910ff78e0e3a1f87aec (patch)
tree485ed41f615a54491944f02a3ecfc55f2894bbfd /xfa/fxfa/fm2js/cxfa_fmparser_unittest.cpp
parentceab166b7dafc2bb514755e4a017bf178d0c8e8b (diff)
downloadpdfium-e76345ec2780ec13cc99b910ff78e0e3a1f87aec.tar.xz
[formcalc] Treat elseif and else the same during output
This CL combines the elseif and else output code for formcalc. This causes an extra set of {}'s to be output in the else case but should be syntactically the same. Change-Id: Ie30a51efadae2034d117f4bf280b9f7abc950a23 Reviewed-on: https://pdfium-review.googlesource.com/27431 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'xfa/fxfa/fm2js/cxfa_fmparser_unittest.cpp')
-rw-r--r--xfa/fxfa/fm2js/cxfa_fmparser_unittest.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/xfa/fxfa/fm2js/cxfa_fmparser_unittest.cpp b/xfa/fxfa/fm2js/cxfa_fmparser_unittest.cpp
index cff98531bd..458213a4a0 100644
--- a/xfa/fxfa/fm2js/cxfa_fmparser_unittest.cpp
+++ b/xfa/fxfa/fm2js/cxfa_fmparser_unittest.cpp
@@ -90,7 +90,7 @@ TEST(CXFA_FMParserTest, Parse) {
L"pfm_rt.dot_acc(border, \"border\", \"fill\", 0, 0), \"\", "
L"\"color\", 0, 0), \"\", \"value\", 0, 0), \"255,64,64\");\n"
L"}\n"
- L"}\nelse\n{\n"
+ L"}\nelse\n{\n{\n"
L"if (pfm_rt.is_obj(pfm_rt.dot_acc(pfm_rt.dot_acc(pfm_rt.dot_acc("
L"border, \"border\", \"fill\", 0, 0), \"\", \"color\", 0, 0), \"\", "
L"\"value\", 0, 0)))\n{\n"
@@ -99,6 +99,7 @@ TEST(CXFA_FMParserTest, Parse) {
L"\"color\", 0, 0), \"\", \"value\", 0, 0), \"20,170,13\");\n"
L"}\n"
L"}\n"
+ L"}\n"
L"pfm_ret = this;\n"
L"return pfm_rt.get_val(pfm_ret);\n"
L"}\n).call(this);\n";