summaryrefslogtreecommitdiff
path: root/testing/resources/javascript/document_methods.in
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-10-18 21:42:20 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-10-18 21:42:20 +0000
commit8953baf1e0a47d7b1ad2008e8e14ecc74269416a (patch)
tree315c7f2cc09df978ae517532b6edc1c9410ff38e /testing/resources/javascript/document_methods.in
parent0e5bab1b8402b65fa09a36a2b141bbf22291f822 (diff)
downloadpdfium-8953baf1e0a47d7b1ad2008e8e14ecc74269416a.tar.xz
Expand CJS_Document::mail{Doc,Form}() parameters
Use ExpandKeywordParams() rather than ad-hoc processing. Add test case for {} argument. Change-Id: I1f60a87b3995d62f4bead79245a1f58fd31b102e Reviewed-on: https://pdfium-review.googlesource.com/c/44290 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'testing/resources/javascript/document_methods.in')
-rw-r--r--testing/resources/javascript/document_methods.in16
1 files changed, 14 insertions, 2 deletions
diff --git a/testing/resources/javascript/document_methods.in b/testing/resources/javascript/document_methods.in
index bb7af748d8..be4bf63b64 100644
--- a/testing/resources/javascript/document_methods.in
+++ b/testing/resources/javascript/document_methods.in
@@ -260,10 +260,16 @@ function testMailDoc() {
// TODO(tsepez): test with no permissions.
// Success cases.
- expect('this.mailDoc(true)', undefined);
+ expect('this.mailDoc()', undefined);
expect('this.mailDoc(false, "user@example.com", "cc@example.com", ' +
'"bcc@example.com", "Lottery Winner", "You won the lottery!")',
undefined);
+ expect('this.mailDoc({})', undefined);
+ expect('this.mailDoc({"bUI": false, "cTo": "user@example.com", ' +
+ '"cCc": "cc@example.com", "cBcc": "bcc@example.com", ' +
+ '"cSubject": "LotteryWinner", "cMsg": "You won the lottery!", ' +
+ '"bogus": "yes"})',
+ undefined);
}
function testMailForm() {
@@ -273,10 +279,16 @@ function testMailForm() {
// TODO(tsepez): test with no permissions.
// Success cases.
- expect('this.mailForm(true)', undefined);
+ expect('this.mailForm()', undefined);
expect('this.mailForm(false, "user@example.com", "cc@example.com", ' +
'"bcc@example.com", "Lottery Winner", "You won the lottery!")',
undefined);
+ expect('this.mailForm({})', undefined);
+ expect('this.mailForm({"bUI": false, "cTo": "user@example.com", ' +
+ '"cCc": "cc@example.com", "cBcc": "bcc@example.com", ' +
+ '"cSubject": "LotteryWinner", "cMsg": "You won the lottery!", ' +
+ '"bogus": "yes"})',
+ undefined);
}
function testPrint() {