summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-10-22 20:35:17 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-10-22 20:35:17 +0000
commit25b56107ef349726f74b27de2d491ac3fc5d36ca (patch)
treebe6b42c0e360ec4f97d3a89c401d30f3961136ef
parentd3a34fe4665eed1ff09a5d06e565ffefb9a26134 (diff)
downloadpdfium-25b56107ef349726f74b27de2d491ac3fc5d36ca.tar.xz
Call last uncovered document methods.
Test-only CL. Change-Id: Ica1613c42075adb5fedfef6d66d99095cef08655 Reviewed-on: https://pdfium-review.googlesource.com/c/44410 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
-rw-r--r--testing/resources/javascript/document_methods.in7
-rw-r--r--testing/resources/javascript/document_methods_expected.txt5
2 files changed, 10 insertions, 2 deletions
diff --git a/testing/resources/javascript/document_methods.in b/testing/resources/javascript/document_methods.in
index be4bf63b64..87118091c1 100644
--- a/testing/resources/javascript/document_methods.in
+++ b/testing/resources/javascript/document_methods.in
@@ -134,7 +134,8 @@ function testCalculateNow() {
expect('typeof this.calculateNow', 'function');
// TODO(tsepez): test with no permissions.
- // TODO(tsepez): test success cases.
+
+ expect('this.calculateNow()', undefined)
}
function testGetAnnot() {
@@ -214,7 +215,8 @@ function testGetPageNthWordQuads() {
expect('typeof this.getPageNthWordQuads', 'function');
// TODO(tsepez): test with no permissions.
- // TODO(tsepez): test success cases.
+
+ expectError('this.getPageNthWordQuads()');
}
function testGetPageNumWords() {
@@ -350,6 +352,7 @@ try {
testUnsupported('this.exportAsXFDF');
testUnsupported('this.extractPages');
testUnsupported('this.getAnnot3D');
+ testUnsupported('this.getAnnots3D');
testUnsupported('this.getLinks');
testUnsupported('this.getOCGs');
testUnsupported('this.getPageBox');
diff --git a/testing/resources/javascript/document_methods_expected.txt b/testing/resources/javascript/document_methods_expected.txt
index 1cb2dbdfcc..b91c35976a 100644
--- a/testing/resources/javascript/document_methods_expected.txt
+++ b/testing/resources/javascript/document_methods_expected.txt
@@ -32,6 +32,9 @@ Alert: PASS: this.extractPages(1, 2, "clams", [1, 2, 3]) = undefined
Alert: PASS: typeof this.getAnnot3D = function
Alert: PASS: this.getAnnot3D() = undefined
Alert: PASS: this.getAnnot3D(1, 2, "clams", [1, 2, 3]) = undefined
+Alert: PASS: typeof this.getAnnots3D = function
+Alert: PASS: this.getAnnots3D() = undefined
+Alert: PASS: this.getAnnots3D(1, 2, "clams", [1, 2, 3]) = undefined
Alert: PASS: typeof this.getLinks = function
Alert: PASS: this.getLinks() = undefined
Alert: PASS: this.getLinks(1, 2, "clams", [1, 2, 3]) = undefined
@@ -76,6 +79,7 @@ Alert: PASS: this.addIcon(1, 2, 3) threw error Document.addIcon: Incorrect numbe
Alert: PASS: this.addIcon("myicon", 3) threw error Document.addIcon: Incorrect parameter type.
Alert: PASS: this.addIcon("myicon", undefined) threw error Document.addIcon: Incorrect parameter type.
Alert: PASS: typeof this.calculateNow = function
+Alert: PASS: this.calculateNow() = undefined
Alert: PASS: typeof this.getAnnot = function
Alert: PASS: this.getAnnot() threw error Document.getAnnot: Incorrect number of parameters passed to function.
Alert: PASS: this.getAnnot(0) threw error Document.getAnnot: Incorrect number of parameters passed to function.
@@ -96,6 +100,7 @@ Alert: PASS: this.getPageNthWord(0, 0, true, "clams", [1, 2]) = Hello,
Alert: PASS: this.getPageNthWord(-1, 0, true) threw error Document.getPageNthWord: Incorrect parameter value.
Alert: PASS: this.getPageNthWord(6, 0, true) threw error Document.getPageNthWord: Incorrect parameter value.
Alert: PASS: typeof this.getPageNthWordQuads = function
+Alert: PASS: this.getPageNthWordQuads() threw error Document.getPageNthWordQuads: Operation not supported.
Alert: PASS: typeof this.getPageNumWords = function
Alert: PASS: this.getPageNumWords(0, "clams", [1, 2]) = 2
Alert: PASS: this.getPageNumWords(-1) threw error Document.getPageNumWords: Incorrect parameter value.