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>
diff --git a/testing/resources/javascript/document_methods.in b/testing/resources/javascript/document_methods.in index be4bf63..8711809 100644 --- a/testing/resources/javascript/document_methods.in +++ b/testing/resources/javascript/document_methods.in
@@ -134,7 +134,8 @@ 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 @@ 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 @@ 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 1cb2dbd..b91c359 100644 --- a/testing/resources/javascript/document_methods_expected.txt +++ b/testing/resources/javascript/document_methods_expected.txt
@@ -32,6 +32,9 @@ 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("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(-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.