Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(368)

Issue 912803004: Create run_javascript_tests.py (Closed)

Created:
5 years, 10 months ago by Tom Sepez
Modified:
5 years, 10 months ago
Reviewers:
Lei Zhang, jam
CC:
pdfium-reviews_googlegroups.com
Base URL:
https://pdfium.googlesource.com/pdfium.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Create run_javascript_tests.py Top level script driver for testing/resources/javascript. Converts each input template file in that directory to a .pdf file in the working directory (typically out/Debug/gen/pdfium/testing/resources/javascript), invokes pdfium_test on it to generate , and crudely diffs the expected output. We can now remove generated .pdfs from source control, keeping only the hand-editable .in templates. R=thestig@chromium.org Committed: https://pdfium.googlesource.com/pdfium/+/9f93baf8766c2505f9ad28ebfedb4f28ece7aa02

Patch Set 1 #

Patch Set 2 : remove generated pdf from source control #

Patch Set 3 : Allow for in-directory generation as before #

Patch Set 4 : 80 cols #

Total comments: 23

Patch Set 5 : comments #

Patch Set 6 : One more place to use _ #

Patch Set 7 : Don't rely on cwd #

Patch Set 8 : Typo in comment. #

Patch Set 9 : rework some more #

Patch Set 10 : 80 cols #

Patch Set 11 : typos. #

Total comments: 4

Patch Set 12 : Address nits. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+109 lines, -154 lines) Patch
D testing/resources/javascript/app_alert.pdf View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -60 lines 0 comments Download
D testing/resources/javascript/consts.pdf View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -86 lines 0 comments Download
M testing/tools/fixup_pdf_template.py View 1 2 3 4 5 6 7 8 1 chunk +18 lines, -8 lines 0 comments Download
A testing/tools/run_javascript_tests.py View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +91 lines, -0 lines 1 comment Download

Messages

Total messages: 17 (3 generated)
Tom Sepez
Lei, please review (.py isn't my native language). John, what else would you need to ...
5 years, 10 months ago (2015-02-10 21:25:09 UTC) #3
Lei Zhang
https://codereview.chromium.org/912803004/diff/50001/testing/tools/fixup_pdf_template.py File testing/tools/fixup_pdf_template.py (right): https://codereview.chromium.org/912803004/diff/50001/testing/tools/fixup_pdf_template.py#newcode73 testing/tools/fixup_pdf_template.py:73: def expand_file(input_filename, output_dir): Two blank lines between top-level definitions: ...
5 years, 10 months ago (2015-02-10 23:09:30 UTC) #4
Tom Sepez
https://codereview.chromium.org/912803004/diff/50001/testing/tools/fixup_pdf_template.py File testing/tools/fixup_pdf_template.py (right): https://codereview.chromium.org/912803004/diff/50001/testing/tools/fixup_pdf_template.py#newcode73 testing/tools/fixup_pdf_template.py:73: def expand_file(input_filename, output_dir): On 2015/02/10 23:09:29, Lei Zhang wrote: ...
5 years, 10 months ago (2015-02-10 23:33:32 UTC) #5
Lei Zhang
https://codereview.chromium.org/912803004/diff/50001/testing/tools/run_javascript_tests.py File testing/tools/run_javascript_tests.py (right): https://codereview.chromium.org/912803004/diff/50001/testing/tools/run_javascript_tests.py#newcode32 testing/tools/run_javascript_tests.py:32: parser.add_option('--source-dir', On 2015/02/10 23:33:31, Tom Sepez wrote: > Actually, ...
5 years, 10 months ago (2015-02-11 00:03:21 UTC) #6
Tom Sepez
> Oh right, this is pdfium. In any case, I think it's not friendly for ...
5 years, 10 months ago (2015-02-11 00:52:18 UTC) #7
jam
On 2015/02/10 21:25:09, Tom Sepez wrote: > Lei, please review (.py isn't my native language). ...
5 years, 10 months ago (2015-02-11 17:03:59 UTC) #8
Tom Sepez
On 2015/02/11 17:03:59, jam wrote: > On 2015/02/10 21:25:09, Tom Sepez wrote: > > Lei, ...
5 years, 10 months ago (2015-02-11 17:22:41 UTC) #9
Tom Sepez
Lei, please re-review. Thanks.
5 years, 10 months ago (2015-02-11 20:01:28 UTC) #10
Lei Zhang
lgtm https://codereview.chromium.org/912803004/diff/190001/testing/tools/run_javascript_tests.py File testing/tools/run_javascript_tests.py (right): https://codereview.chromium.org/912803004/diff/190001/testing/tools/run_javascript_tests.py#newcode36 testing/tools/run_javascript_tests.py:36: parser.add_option('--build-dir', default=os.path.join('out', 'Debug')) Add a help message: parser.add_option('--build-dir', ...
5 years, 10 months ago (2015-02-11 22:45:34 UTC) #11
Tom Sepez
https://codereview.chromium.org/912803004/diff/190001/testing/tools/run_javascript_tests.py File testing/tools/run_javascript_tests.py (right): https://codereview.chromium.org/912803004/diff/190001/testing/tools/run_javascript_tests.py#newcode36 testing/tools/run_javascript_tests.py:36: parser.add_option('--build-dir', default=os.path.join('out', 'Debug')) On 2015/02/11 22:45:34, Lei Zhang wrote: ...
5 years, 10 months ago (2015-02-12 18:18:49 UTC) #13
Tom Sepez
Committed patchset #12 (id:210001) manually as 9f93baf8766c2505f9ad28ebfedb4f28ece7aa02 (presubmit successful).
5 years, 10 months ago (2015-02-12 18:19:58 UTC) #14
Tom Sepez
Ok, John, could you take a shot at seeing if this will run on the ...
5 years, 10 months ago (2015-02-12 18:20:31 UTC) #15
jam
https://codereview.chromium.org/912803004/diff/210001/testing/tools/run_javascript_tests.py File testing/tools/run_javascript_tests.py (right): https://codereview.chromium.org/912803004/diff/210001/testing/tools/run_javascript_tests.py#newcode44 testing/tools/run_javascript_tests.py:44: if os.path.basename(pdfium_dir) != 'pdfium': looks like this assumes that ...
5 years, 10 months ago (2015-02-13 17:14:38 UTC) #16
Tom Sepez
5 years, 10 months ago (2015-02-13 17:30:41 UTC) #17
Message was sent while issue was closed.
On 2015/02/13 17:14:38, jam wrote:
>
https://codereview.chromium.org/912803004/diff/210001/testing/tools/run_javas...
> File testing/tools/run_javascript_tests.py (right):
> 
>
https://codereview.chromium.org/912803004/diff/210001/testing/tools/run_javas...
> testing/tools/run_javascript_tests.py:44: if os.path.basename(pdfium_dir) !=
> 'pdfium':
> looks like this assumes that the checkout directory is called 'pdfium'.
locally,
> I don't have that and I wanted to test this out.
> 
> seems like no reason to require this?
Argh, you're right, the top-level directory name isn't part of the repo and is
arbitrary.
I'll put together another CL to deal with this.  Thanks.

Powered by Google App Engine
This is Rietveld 408576698