Add (disabled) test case for functional bug 1333298
Keep it disabled until the underlying issue is resolved.
-- fix pre-existing gtest naming convention in other test in file.
Bug: chromium:1333298
Change-Id: I528c2dc06d98ab737e940593c8ed9160339c185a
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/94290
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/fxjs/xfa/cjx_object_embeddertest.cpp b/fxjs/xfa/cjx_object_embeddertest.cpp
index 4a7185e..b30bd46 100644
--- a/fxjs/xfa/cjx_object_embeddertest.cpp
+++ b/fxjs/xfa/cjx_object_embeddertest.cpp
@@ -10,6 +10,11 @@
class CJX_ObjectEmbedderTest : public XFAJSEmbedderTest {};
// Should not crash, but document is not valid.
-TEST_F(CJX_ObjectEmbedderTest, BUG_1327884) {
+TEST_F(CJX_ObjectEmbedderTest, Bug1327884) {
ASSERT_FALSE(OpenDocument("bug_1327884.pdf"));
}
+
+// TODO(https://crbug.com/1333298) hits hard CHECK().
+TEST_F(CJX_ObjectEmbedderTest, DISABLED_Bug1333298) {
+ ASSERT_FALSE(OpenDocument("bug_1333298.pdf"));
+}
diff --git a/testing/resources/bug_1333298.in b/testing/resources/bug_1333298.in
new file mode 100644
index 0000000..5b45ed9
--- /dev/null
+++ b/testing/resources/bug_1333298.in
@@ -0,0 +1,28 @@
+{{header}}
+{{include xfa_catalog_1_0.fragment}}
+{{include xfa_object_2_0.fragment}}
+{{include xfa_preamble_3_0.fragment}}
+{{include xfa_config_4_0.fragment}}
+{{object 5 0}} <<
+ {{streamlen}}
+>>
+stream
+<template>
+ <subform>
+ <desc name="N01" use=" .[N01.use=" .[N01.#use]"]"/>
+ <proto>
+ <proto>
+ <bindItems/>
+ </proto>
+ </proto>
+ </subform>
+</template>
+endstream
+endobj
+{{include xfa_locale_6_0.fragment}}
+{{include xfa_postamble_7_0.fragment}}
+{{include xfa_pages_8_0.fragment}}
+{{xref}}
+{{trailer}}
+{{startxref}}
+%%EOF
diff --git a/testing/resources/bug_1333298.pdf b/testing/resources/bug_1333298.pdf
new file mode 100644
index 0000000..c003ca9
--- /dev/null
+++ b/testing/resources/bug_1333298.pdf
@@ -0,0 +1,237 @@
+%PDF-1.7
+% ò¤ô
+1 0 obj <<
+ /AcroForm 2 0 R
+ /Extensions <<
+ /ADBE <<
+ /BaseVersion /1.7
+ /ExtensionLevel 8
+ >>
+ >>
+ /NeedsRendering true
+ /Pages 8 0 R
+ /Type /Catalog
+>>
+endobj
+2 0 obj <<
+ /XFA [
+ (preamble)
+ 3 0 R
+ (config)
+ 4 0 R
+ (template)
+ 5 0 R
+ (localeSet)
+ 6 0 R
+ (postamble)
+ 7 0 R
+ ]
+>>
+endobj
+3 0 obj <<
+ /Length 124
+>>
+stream
+<xdp:xdp xmlns:xdp="http://ns.adobe.com/xdp/" timeStamp="2018-02-23T21:37:11Z" uuid="21482798-7bf0-40a4-bc5d-3cefdccf32b5">
+endstream
+endobj
+4 0 obj <<
+ /Length 642
+>>
+stream
+<config xmlns="http://www.xfa.org/schema/xci/3.0/">
+<agent name="designer">
+ <destination>pdf</destination>
+ <pdf>
+ <fontInfo/>
+ </pdf>
+</agent>
+<present>
+ <pdf>
+ <version>1.7</version>
+ <adobeExtensionLevel>8</adobeExtensionLevel>
+ <renderPolicy>client</renderPolicy>
+ <scriptModel>XFA</scriptModel>
+ <interactive>1</interactive>
+ </pdf>
+ <xdp>
+ <packets>*</packets>
+ </xdp>
+ <destination>pdf</destination>
+ <script>
+ <runScripts>server</runScripts>
+ </script>
+</present>
+<acrobat>
+ <acrobat7>
+ <dynamicRender>required</dynamicRender>
+ </acrobat7>
+ <validate>preSubmit</validate>
+</acrobat>
+</config>
+endstream
+endobj
+5 0 obj <<
+ /Length 189
+>>
+stream
+<template>
+ <subform>
+ <desc name="N01" use=" .[N01.use=" .[N01.#use]"]"/>
+ <proto>
+ <proto>
+ <bindItems/>
+ </proto>
+ </proto>
+ </subform>
+</template>
+endstream
+endobj
+6 0 obj <<
+ /Length 3455
+>>
+stream
+<localeSet xmlns="http://www.xfa.org/schema/xfa-locale-set/2.7/">
+ <locale name="en_US" desc="English (United States)">
+ <calendarSymbols name="gregorian">
+ <monthNames>
+ <month>January</month>
+ <month>February</month>
+ <month>March</month>
+ <month>April</month>
+ <month>May</month>
+ <month>June</month>
+ <month>July</month>
+ <month>August</month>
+ <month>September</month>
+ <month>October</month>
+ <month>November</month>
+ <month>December</month>
+ </monthNames>
+ <monthNames abbr="1">
+ <month>Jan</month>
+ <month>Feb</month>
+ <month>Mar</month>
+ <month>Apr</month>
+ <month>May</month>
+ <month>Jun</month>
+ <month>Jul</month>
+ <month>Aug</month>
+ <month>Sep</month>
+ <month>Oct</month>
+ <month>Nov</month>
+ <month>Dec</month>
+ </monthNames>
+ <dayNames>
+ <day>Sunday</day>
+ <day>Monday</day>
+ <day>Tuesday</day>
+ <day>Wednesday</day>
+ <day>Thursday</day>
+ <day>Friday</day>
+ <day>Saturday</day>
+ </dayNames>
+ <dayNames abbr="1">
+ <day>Sun</day>
+ <day>Mon</day>
+ <day>Tue</day>
+ <day>Wed</day>
+ <day>Thu</day>
+ <day>Fri</day>
+ <day>Sat</day>
+ </dayNames>
+ <meridiemNames>
+ <meridiem>AM</meridiem>
+ <meridiem>PM</meridiem>
+ </meridiemNames>
+ <eraNames>
+ <era>BC</era>
+ <era>AD</era>
+ </eraNames>
+ </calendarSymbols>
+ <datePatterns>
+ <datePattern name="full">EEEE, MMMM D, YYYY</datePattern>
+ <datePattern name="long">MMMM D, YYYY</datePattern>
+ <datePattern name="med">MMM D, YYYY</datePattern>
+ <datePattern name="short">M/D/YY</datePattern>
+ </datePatterns>
+ <timePatterns>
+ <timePattern name="full">h:MM:SS A Z</timePattern>
+ <timePattern name="long">h:MM:SS A Z</timePattern>
+ <timePattern name="med">h:MM:SS A</timePattern>
+ <timePattern name="short">h:MM A</timePattern>
+ </timePatterns>
+ <dateTimeSymbols>GyMdkHmsSEDFwWahKzZ</dateTimeSymbols>
+ <numberPatterns>
+ <numberPattern name="numeric">z,zz9.zzz</numberPattern>
+ <numberPattern name="currency">$z,zz9.99|($z,zz9.99)</numberPattern>
+ <numberPattern name="percent">z,zz9%</numberPattern>
+ </numberPatterns>
+ <numberSymbols>
+ <numberSymbol name="decimal">.</numberSymbol>
+ <numberSymbol name="grouping">,</numberSymbol>
+ <numberSymbol name="percent">%</numberSymbol>
+ <numberSymbol name="minus">-</numberSymbol>
+ <numberSymbol name="zero">0</numberSymbol>
+ </numberSymbols>
+ <currencySymbols>
+ <currencySymbol name="symbol">$</currencySymbol>
+ <currencySymbol name="isoname">USD</currencySymbol>
+ <currencySymbol name="decimal">.</currencySymbol>
+ </currencySymbols>
+ <typefaces>
+ <typeface name="Myriad Pro"/>
+ <typeface name="Minion Pro"/>
+ <typeface name="Courier Std"/>
+ <typeface name="Adobe Pi Std"/>
+ <typeface name="Adobe Hebrew"/>
+ <typeface name="Adobe Arabic"/>
+ <typeface name="Adobe Thai"/>
+ <typeface name="Kozuka Gothic Pro-VI M"/>
+ <typeface name="Kozuka Mincho Pro-VI R"/>
+ <typeface name="Adobe Ming Std L"/>
+ <typeface name="Adobe Song Std L"/>
+ <typeface name="Adobe Myungjo Std M"/>
+ </typefaces>
+ </locale>
+</localeSet>
+endstream
+endobj
+7 0 obj <<
+ /Length 11
+>>
+stream
+</xdp:xdp>
+endstream
+endobj
+8 0 obj <<
+ /Type /Pages
+ /Count 1
+ /Kids [9 0 R]
+>>
+endobj
+9 0 obj <<
+ /Type /Page
+ /Parent 8 0 R
+ /MediaBox [0 0 612 792]
+>>
+endobj
+xref
+0 10
+0000000000 65535 f
+0000000015 00000 n
+0000000199 00000 n
+0000000358 00000 n
+0000000534 00000 n
+0000001228 00000 n
+0000001469 00000 n
+0000004977 00000 n
+0000005039 00000 n
+0000005102 00000 n
+trailer <<
+ /Root 1 0 R
+ /Size 10
+>>
+startxref
+5179
+%%EOF