From df0a749452d933e4f434e2a33112667f1880db34 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Tue, 2 Jan 2018 17:06:20 -0500 Subject: 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 Commit-Queue: dsinclair --- testing/resources/bug_765384.in | 7 ------- testing/resources/bug_765384.pdf | 15 ++++----------- 2 files changed, 4 insertions(+), 18 deletions(-) (limited to 'testing') 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 -- cgit v1.2.3