xref: /aosp_15_r20/external/pdfium/testing/resources/javascript/xfa_specific/xfa_model.in (revision 3ac0a46f773bac49fa9476ec2b1cf3f8da5ec3a4)
1{{header}}
2{{include ../../xfa_catalog_1_0.fragment}}
3{{include ../../xfa_object_2_0.fragment}}
4{{include ../../xfa_preamble_3_0.fragment}}
5{{include ../../xfa_config_4_0.fragment}}
6{{object 5 0}} <<
7  {{streamlen}}
8>>
9stream
10<template>
11  <subform layout="tb" name="my_doc">
12    <pageSet id="page" relation="orderedOccurrence">
13      <occur initial="1" max="1" min="1"/>
14      <pageArea id="Page1" name="Page1">
15        <occur max="1" min="1"/>
16        <contentArea h="100mm" w="200mm" x="0.25in" y="0.25in"/>
17      </pageArea>
18      <pageArea id="Page2" name="Page2">
19        <occur max="1" min="1"/>
20        <contentArea h="100mm" w="200mm" x="0.25in" y="0.25in"/>
21      </pageArea>
22    </pageSet>
23    <event activity="docReady" ref="$host">
24      <script contentType="application/x-javascript">
25        {{include ../expect.js}}
26        {{include ../property_test_helpers.js}}
27        testRIProperty(xfa.form, "aliasNode", undefined);
28        testRIProperty(xfa.form, "context", undefined);
29        expect("typeof xfa.form.clearErrorList", "function");
30        expect("typeof xfa.form.createNode", "function");
31        expect("typeof xfa.form.isCompatibleNS", "function");
32        expect("xfa.form.clearErrorList('args', 'ignored')", undefined);
33        expectError("xfa.form.createNode()");
34        expect("xfa.form.createNode('bogus')", undefined);
35        expect("xfa.form.createNode('template')", "[object XFAObject]");
36        expectError("xfa.form.isCompatibleNS()");
37        expect("xfa.form.isCompatibleNS('bogus')", false);
38        expect("xfa.form.isCompatibleNS('')", true);
39      </script>
40    </event>
41  </subform>
42</template>
43endstream
44endobj
45{{include ../../xfa_locale_6_0.fragment}}
46{{include ../../xfa_postamble_7_0.fragment}}
47{{include ../../xfa_pages_8_0.fragment}}
48{{xref}}
49{{trailer}}
50{{startxref}}
51%%EOF
52