[Pkg-javascript-commits] [pdf.js] 83/161: Add Test for PDFDocumentProxy_getPageIndex

David Prévot taffit at moszumanska.debian.org
Sat Apr 19 14:16:31 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository pdf.js.

commit c547f17ee5eb086fa759472a441c1e97a8801f52
Author: Thorben Bochenek <thorbenb at opera.com>
Date:   Wed Mar 19 10:17:58 2014 +0100

    Add Test for PDFDocumentProxy_getPageIndex
---
 test/unit/api_spec.js | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/test/unit/api_spec.js b/test/unit/api_spec.js
index eee5fcf..ff22860 100644
--- a/test/unit/api_spec.js
+++ b/test/unit/api_spec.js
@@ -54,6 +54,14 @@ describe('api', function() {
         expect(true).toEqual(true);
       });
     });
+    it('gets page index', function() {
+      // reference to second page
+      var ref = {num: 17, gen: 0};
+      var promise = doc.getPageIndex(ref);
+      waitsForPromise(promise, function(pageIndex) {
+        expect(pageIndex).toEqual(1);
+      });
+    });
     it('gets destinations', function() {
       var promise = doc.getDestinations();
       waitsForPromise(promise, function(data) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git



More information about the Pkg-javascript-commits mailing list