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>
diff --git a/testing/resources/bug_765384.in b/testing/resources/bug_765384.in
index 1de85d3..e7e46c7 100644
--- a/testing/resources/bug_765384.in
+++ b/testing/resources/bug_765384.in
@@ -70,16 +70,9 @@
{{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 fcaa5f4..e820fcc 100644
--- a/testing/resources/bug_765384.pdf
+++ b/testing/resources/bug_765384.pdf
@@ -71,16 +71,9 @@
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 @@
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