1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 15:18:08 +02:00

Require destinations when they are needed and do not fetch all of them in advance

This commit is contained in:
Tim van der Meij 2014-10-05 15:56:40 +02:00
parent fb6d87c77b
commit b215af30d3
5 changed files with 80 additions and 16 deletions

View file

@ -123,6 +123,13 @@ describe('api', function() {
0, 841.89, null] });
});
});
it('gets a destination', function() {
var promise = doc.getDestination('chapter1');
waitsForPromiseResolved(promise, function(data) {
expect(data).toEqual([{ gen: 0, num: 17 }, { name: 'XYZ' },
0, 841.89, null]);
});
});
it('gets attachments', function() {
var promise = doc.getAttachments();
waitsForPromiseResolved(promise, function (data) {