summaryrefslogtreecommitdiff
path: root/testing/resources
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-01-02 17:06:20 -0500
committerChromium commit bot <commit-bot@chromium.org>2018-01-04 20:19:21 +0000
commitdf0a749452d933e4f434e2a33112667f1880db34 (patch)
treea7732743d73c5a7e3df6605b38c066cf82940c39 /testing/resources
parent86b5267ac4c2f169f105a1ea30cdf2eb0ea0b5dc (diff)
downloadpdfium-df0a749452d933e4f434e2a33112667f1880db34.tar.xz
Remove allocations from JS test
This CL removes the millions of allocations from the test case for bug 765384. This takes the test execution from ~20s to ~400ms when run in Debug. Bug: chromium:765384 Change-Id: Ib1e9d3c6fb9853e541189e1a16f765d05202cdcc Reviewed-on: https://pdfium-review.googlesource.com/22011 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'testing/resources')
-rw-r--r--testing/resources/bug_765384.in7
-rw-r--r--testing/resources/bug_765384.pdf15
2 files changed, 4 insertions, 18 deletions
diff --git a/testing/resources/bug_765384.in b/testing/resources/bug_765384.in
index 1de85d31ba..e7e46c797e 100644
--- a/testing/resources/bug_765384.in
+++ b/testing/resources/bug_765384.in
@@ -70,16 +70,9 @@ endobj
{{object 21 0}} <<
>>
stream
-function gc() {
- tmp = [];
- for (var i = 0; i < 0x200000; i++)
- tmp.push(new Uint8Array(10));
- tmp = null;
-}
this.getField("MyField2").setFocus();
this.getField("MyField").borderStyle="dashed";
this.getField("MyField").setFocus();
-gc();
endstream
endobj
{{object 43 0}} <<
diff --git a/testing/resources/bug_765384.pdf b/testing/resources/bug_765384.pdf
index fcaa5f4305..e820fcc736 100644
--- a/testing/resources/bug_765384.pdf
+++ b/testing/resources/bug_765384.pdf
@@ -71,16 +71,9 @@ endobj
21 0 obj <<
>>
stream
-function gc() {
- tmp = [];
- for (var i = 0; i < 0x200000; i++)
- tmp.push(new Uint8Array(10));
- tmp = null;
-}
this.getField("MyField2").setFocus();
this.getField("MyField").borderStyle="dashed";
this.getField("MyField").setFocus();
-gc();
endstream
endobj
43 0 obj <<
@@ -145,15 +138,15 @@ xref
0000000000 65535 f
0000000000 65535 f
0000000000 65535 f
-0000001106 00000 n
+0000000985 00000 n
0000000000 65535 f
0000000000 65535 f
0000000000 65535 f
0000000000 65535 f
0000000000 65535 f
-0000001230 00000 n
-0000001308 00000 n
+0000001109 00000 n
+0000001187 00000 n
trailer<< /Root 1 0 R /Size 51 >>
startxref
-1357
+1236
%%EOF