summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-05-15 18:19:25 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-05-15 18:19:25 +0000
commit6595905a9e6080cfc9a99310b597d66463a7eb2f (patch)
treee316dae8268cdbc7df8baa874f9b27d3f1494335
parentbcb81523776512ba45af6e479cafc421871a88a1 (diff)
downloadpdfium-6595905a9e6080cfc9a99310b597d66463a7eb2f.tar.xz
Use {{trailer}} macro in testing/resources/javascript/*.in
Also format the trailer in a cleaner multi-line format. Change-Id: If145834b56f8678f97247b346cc0cfd4d367c501 Reviewed-on: https://pdfium-review.googlesource.com/32571 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
-rw-r--r--testing/resources/javascript/app_alert.in4
-rw-r--r--testing/resources/javascript/app_mailmsg.in4
-rw-r--r--testing/resources/javascript/app_repsonse.in4
-rw-r--r--testing/resources/javascript/apply.in4
-rw-r--r--testing/resources/javascript/array_buffer.in4
-rw-r--r--testing/resources/javascript/bug_361.in4
-rw-r--r--testing/resources/javascript/bug_492_1.in4
-rw-r--r--testing/resources/javascript/bug_494057.in4
-rw-r--r--testing/resources/javascript/bug_679642.in4
-rw-r--r--testing/resources/javascript/bug_679643.in4
-rw-r--r--testing/resources/javascript/bug_695826.in4
-rw-r--r--testing/resources/javascript/bug_735912.in4
-rw-r--r--testing/resources/javascript/bug_740166.in4
-rw-r--r--testing/resources/javascript/consts.in4
-rw-r--r--testing/resources/javascript/field.in4
-rw-r--r--testing/resources/javascript/globals.in4
-rw-r--r--testing/resources/javascript/util_bytetochar.in4
-rw-r--r--testing/resources/javascript/util_printd.in4
-rw-r--r--testing/resources/javascript/util_printx.in4
-rwxr-xr-xtesting/tools/fixup_pdf_template.py2
20 files changed, 20 insertions, 58 deletions
diff --git a/testing/resources/javascript/app_alert.in b/testing/resources/javascript/app_alert.in
index 75aecc9075..99c3c242b7 100644
--- a/testing/resources/javascript/app_alert.in
+++ b/testing/resources/javascript/app_alert.in
@@ -64,8 +64,6 @@ try {
endstream
endobj
{{xref}}
-trailer <<
- /Root 1 0 R
->>
+{{trailer}}
{{startxref}}
%%EOF
diff --git a/testing/resources/javascript/app_mailmsg.in b/testing/resources/javascript/app_mailmsg.in
index 990709be47..8fcf2e79a4 100644
--- a/testing/resources/javascript/app_mailmsg.in
+++ b/testing/resources/javascript/app_mailmsg.in
@@ -65,8 +65,6 @@ try {
endstream
endobj
{{xref}}
-trailer <<
- /Root 1 0 R
->>
+{{trailer}}
{{startxref}}
%%EOF
diff --git a/testing/resources/javascript/app_repsonse.in b/testing/resources/javascript/app_repsonse.in
index bd78da35e3..bbe77afe43 100644
--- a/testing/resources/javascript/app_repsonse.in
+++ b/testing/resources/javascript/app_repsonse.in
@@ -68,8 +68,6 @@ try {
endstream
endobj
{{xref}}
-trailer <<
- /Root 1 0 R
->>
+{{trailer}}
{{startxref}}
%%EOF
diff --git a/testing/resources/javascript/apply.in b/testing/resources/javascript/apply.in
index 1342c1af4e..f4bb37dff6 100644
--- a/testing/resources/javascript/apply.in
+++ b/testing/resources/javascript/apply.in
@@ -68,8 +68,6 @@ catch (e) {
endstream
endobj
{{xref}}
-trailer <<
- /Root 1 0 R
->>
+{{trailer}}
{{startxref}}
%%EOF
diff --git a/testing/resources/javascript/array_buffer.in b/testing/resources/javascript/array_buffer.in
index 1f3e32d60d..d5262b4f24 100644
--- a/testing/resources/javascript/array_buffer.in
+++ b/testing/resources/javascript/array_buffer.in
@@ -61,8 +61,6 @@ try {
endstream
endobj
{{xref}}
-trailer <<
- /Root 1 0 R
->>
+{{trailer}}
{{startxref}}
%%EOF
diff --git a/testing/resources/javascript/bug_361.in b/testing/resources/javascript/bug_361.in
index 92cd8e30d3..fed81ee38e 100644
--- a/testing/resources/javascript/bug_361.in
+++ b/testing/resources/javascript/bug_361.in
@@ -105,8 +105,6 @@ testField("function(x) { return x+1; }");
endstream
endobj
{{xref}}
-trailer <<
- /Root 1 0 R
->>
+{{trailer}}
{{startxref}}
%%EOF
diff --git a/testing/resources/javascript/bug_492_1.in b/testing/resources/javascript/bug_492_1.in
index f2b03b01bc..17ca1b7f27 100644
--- a/testing/resources/javascript/bug_492_1.in
+++ b/testing/resources/javascript/bug_492_1.in
@@ -88,8 +88,6 @@ endobj
endobj
{{xref}}
-trailer <<
- /Root 1 0 R
->>
+{{trailer}}
{{startxref}}
%%EOF
diff --git a/testing/resources/javascript/bug_494057.in b/testing/resources/javascript/bug_494057.in
index 188b7bf5fa..76b655a868 100644
--- a/testing/resources/javascript/bug_494057.in
+++ b/testing/resources/javascript/bug_494057.in
@@ -109,8 +109,6 @@ TestGetFieldWithDelay();
endstream
endobj
{{xref}}
-trailer <<
- /Root 1 0 R
->>
+{{trailer}}
{{startxref}}
%%EOF
diff --git a/testing/resources/javascript/bug_679642.in b/testing/resources/javascript/bug_679642.in
index 2241723dd2..a1dc2bd1cc 100644
--- a/testing/resources/javascript/bug_679642.in
+++ b/testing/resources/javascript/bug_679642.in
@@ -133,8 +133,6 @@ endobj
endstream
endobj
{{xref}}
-trailer <<
- /Root 1 0 R
->>
+{{trailer}}
{{startxref}}
%%EOF
diff --git a/testing/resources/javascript/bug_679643.in b/testing/resources/javascript/bug_679643.in
index e9643860f7..66deb85815 100644
--- a/testing/resources/javascript/bug_679643.in
+++ b/testing/resources/javascript/bug_679643.in
@@ -128,8 +128,6 @@ endobj
endstream
endobj
{{xref}}
-trailer <<
- /Root 1 0 R
->>
+{{trailer}}
{{startxref}}
%%EOF
diff --git a/testing/resources/javascript/bug_695826.in b/testing/resources/javascript/bug_695826.in
index b20908bc79..bdb1d597ef 100644
--- a/testing/resources/javascript/bug_695826.in
+++ b/testing/resources/javascript/bug_695826.in
@@ -40,8 +40,6 @@ app.alert('Done!');
endstream
endobj
{{xref}}
-trailer <<
- /Root 1 0 R
->>
+{{trailer}}
{{startxref}}
%%EOF
diff --git a/testing/resources/javascript/bug_735912.in b/testing/resources/javascript/bug_735912.in
index 7f42d1b7c2..ab3cc0d1d9 100644
--- a/testing/resources/javascript/bug_735912.in
+++ b/testing/resources/javascript/bug_735912.in
@@ -108,8 +108,6 @@ endobj
endstream
endobj
{{xref}}
-trailer <<
- /Root 1 0 R
->>
+{{trailer}}
{{startxref}}
%%EOF
diff --git a/testing/resources/javascript/bug_740166.in b/testing/resources/javascript/bug_740166.in
index 1e2eb910ff..d2e49822b7 100644
--- a/testing/resources/javascript/bug_740166.in
+++ b/testing/resources/javascript/bug_740166.in
@@ -54,8 +54,6 @@ app.alert(util.printf("Values = %0.1000x .9999 %x", 1, 2));
endstream
endobj
{{xref}}
-trailer <<
- /Root 1 0 R
->>
+{{trailer}}
{{startxref}}
%%EOF
diff --git a/testing/resources/javascript/consts.in b/testing/resources/javascript/consts.in
index 6fb82158e3..d77e0f02c4 100644
--- a/testing/resources/javascript/consts.in
+++ b/testing/resources/javascript/consts.in
@@ -129,9 +129,7 @@ try {
endstream
endobj
{{xref}}
-trailer <<
- /Root 1 0 R
->>
+{{trailer}}
{{startxref}}
%%EOF
diff --git a/testing/resources/javascript/field.in b/testing/resources/javascript/field.in
index c23b81a604..effe16fcf0 100644
--- a/testing/resources/javascript/field.in
+++ b/testing/resources/javascript/field.in
@@ -119,8 +119,6 @@ TestGetArray();
endstream
endobj
{{xref}}
-trailer <<
- /Root 1 0 R
->>
+{{trailer}}
{{startxref}}
%%EOF
diff --git a/testing/resources/javascript/globals.in b/testing/resources/javascript/globals.in
index 4812101e7a..bab7741d0d 100644
--- a/testing/resources/javascript/globals.in
+++ b/testing/resources/javascript/globals.in
@@ -152,8 +152,6 @@ dump_global("After Setup and Persist true");
endstream
endobj
{{xref}}
-trailer <<
- /Root 1 0 R
->>
+{{trailer}}
{{startxref}}
%%EOF
diff --git a/testing/resources/javascript/util_bytetochar.in b/testing/resources/javascript/util_bytetochar.in
index a9adfbccaf..ebe6da6192 100644
--- a/testing/resources/javascript/util_bytetochar.in
+++ b/testing/resources/javascript/util_bytetochar.in
@@ -69,8 +69,6 @@ catch (e) {
endstream
endobj
{{xref}}
-trailer <<
- /Root 1 0 R
->>
+{{trailer}}
{{startxref}}
%%EOF
diff --git a/testing/resources/javascript/util_printd.in b/testing/resources/javascript/util_printd.in
index 4d8610d429..d9ea71e2cc 100644
--- a/testing/resources/javascript/util_printd.in
+++ b/testing/resources/javascript/util_printd.in
@@ -129,8 +129,6 @@ TestOneFormat("mm/dd/yyyy HH:MM:ss", new Date(2014, 06, 04, 15, 59, -1));
endstream
endobj
{{xref}}
-trailer <<
- /Root 1 0 R
->>
+{{trailer}}
{{startxref}}
%%EOF
diff --git a/testing/resources/javascript/util_printx.in b/testing/resources/javascript/util_printx.in
index 7085edc3ea..10d7c566c7 100644
--- a/testing/resources/javascript/util_printx.in
+++ b/testing/resources/javascript/util_printx.in
@@ -81,8 +81,6 @@ TestOneFormat("cl\\9ms", "-1Afp3.d33F$");
endstream
endobj
{{xref}}
-trailer <<
- /Root 1 0 R
->>
+{{trailer}}
{{startxref}}
%%EOF
diff --git a/testing/tools/fixup_pdf_template.py b/testing/tools/fixup_pdf_template.py
index fed0ed8e0a..bee7a3d002 100755
--- a/testing/tools/fixup_pdf_template.py
+++ b/testing/tools/fixup_pdf_template.py
@@ -48,7 +48,7 @@ class TemplateProcessor:
assert(len(XREF_REPLACEMENT_F) == 20)
TRAILER_TOKEN = '{{trailer}}'
- TRAILER_REPLACEMENT = 'trailer<< /Root 1 0 R /Size %d >>'
+ TRAILER_REPLACEMENT = 'trailer <<\n /Root 1 0 R\n /Size %d\n>>'
STARTXREF_TOKEN = '{{startxref}}'
STARTXREF_REPLACEMENT = 'startxref\n%d'