1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 10:08:06 +02:00

Fix isDict when type is missing in dictionary.

This commit is contained in:
Brendan Dahl 2013-01-10 16:32:26 -08:00
parent 2ccad4ca45
commit a79f005527
2 changed files with 21 additions and 1 deletions

View file

@ -63,5 +63,18 @@ describe('util', function() {
});
});
describe('isDict', function() {
it('handles empty dictionaries with type check', function() {
var dict = new Dict();
expect(isDict(dict, 'Page')).toEqual(false);
});
it('handles dictionaries with type check', function() {
var dict = new Dict();
dict.set('Type', new Name('Page'));
expect(isDict(dict, 'Page')).toEqual(true);
});
});
});