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

Issue 872103003: First JavaScript testing implementation. (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

First JavaScript testing implementation. This is a plan for testing JS inside of pdf files under pdfium: Communication of results will be done via app.alert(), rather than console.println(), since the latter is not hooked up to any API callbacks. pdfium_test.cc is modified to be more careful about use of stdout/stderr, so that only the app.alert() and the unsupported feature callback use stdout. Diffing stdout against ..._expected.txt files gives the result. I added a /javascript directory to separate these from the embeddertest resources. The alert callback is backported from XFA. This was an omission. BUG=https://code.google.com/p/pdfium/issues/detail?id=62 R=jam@chromium.org, thestig@chromium.org Committed: https://pdfium.googlesource.com/pdfium/+/72feb27fc174c2139b642eb7390fffac608f6c87

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+140 lines, -18 lines) Patch
M samples/pdfium_test.cc View 5 chunks +34 lines, -18 lines 1 comment Download
A testing/resources/javascript/app_alert.in View 1 chunk +45 lines, -0 lines 0 comments Download
A testing/resources/javascript/app_alert.pdf View 1 chunk +60 lines, -0 lines 0 comments Download
A testing/resources/javascript/app_alert_expected.txt View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 5 (1 generated)
Tom Sepez
John, Lei, please review. Next step in my plan.
5 years, 10 months ago (2015-02-06 17:56:11 UTC) #2
Lei Zhang
lgtm https://codereview.chromium.org/872103003/diff/1/samples/pdfium_test.cc File samples/pdfium_test.cc (right): https://codereview.chromium.org/872103003/diff/1/samples/pdfium_test.cc#newcode227 samples/pdfium_test.cc:227: (wchar_t*)malloc((characters + 1) * sizeof(wchar_t)); avoid C style ...
5 years, 10 months ago (2015-02-06 22:53:07 UTC) #3
jam
lgtm
5 years, 10 months ago (2015-02-06 23:56:30 UTC) #4
Tom Sepez
5 years, 10 months ago (2015-02-06 23:58:44 UTC) #5
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
72feb27fc174c2139b642eb7390fffac608f6c87 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698