| 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 "xfa/fde/xml/fde_xml_imp.h" | 5 #include "xfa/fde/xml/fde_xml_imp.h" |
| 6 | 6 |
| 7 #include "testing/gtest/include/gtest/gtest.h" |
| 7 #include "xfa/fgas/crt/fgas_stream.h" | 8 #include "xfa/fgas/crt/fgas_stream.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" | |
| 9 | 9 |
| 10 TEST(CFDE_XMLSyntaxParser, CData) { | 10 TEST(CFDE_XMLSyntaxParser, CData) { |
| 11 const FX_WCHAR* input = | 11 const FX_WCHAR* input = |
| 12 L"<script contentType=\"application/x-javascript\">\n" | 12 L"<script contentType=\"application/x-javascript\">\n" |
| 13 L" <![CDATA[\n" | 13 L" <![CDATA[\n" |
| 14 L" if (a[1] < 3)\n" | 14 L" if (a[1] < 3)\n" |
| 15 L" app.alert(\"Tclams\");\n" | 15 L" app.alert(\"Tclams\");\n" |
| 16 L" ]]>\n" | 16 L" ]]>\n" |
| 17 L"</script>"; | 17 L"</script>"; |
| 18 | 18 |
| (...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 636 EXPECT_EQ(FDE_XmlSyntaxResult::Text, parser.DoSyntaxParse()); | 636 EXPECT_EQ(FDE_XmlSyntaxResult::Text, parser.DoSyntaxParse()); |
| 637 parser.GetTextData(data); | 637 parser.GetTextData(data); |
| 638 EXPECT_EQ(L" ", data); | 638 EXPECT_EQ(L" ", data); |
| 639 | 639 |
| 640 EXPECT_EQ(FDE_XmlSyntaxResult::ElementClose, parser.DoSyntaxParse()); | 640 EXPECT_EQ(FDE_XmlSyntaxResult::ElementClose, parser.DoSyntaxParse()); |
| 641 parser.GetTagName(data); | 641 parser.GetTagName(data); |
| 642 EXPECT_EQ(L"script", data); | 642 EXPECT_EQ(L"script", data); |
| 643 | 643 |
| 644 EXPECT_EQ(FDE_XmlSyntaxResult::EndOfString, parser.DoSyntaxParse()); | 644 EXPECT_EQ(FDE_XmlSyntaxResult::EndOfString, parser.DoSyntaxParse()); |
| 645 } | 645 } |
| OLD | NEW |