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

Updates Jasmine version.

This commit is contained in:
Yury Delendik 2016-03-29 09:34:13 -05:00
parent df7afcf004
commit 0a700fa29d
25 changed files with 876 additions and 3803 deletions

View file

@ -29,6 +29,14 @@ describe('font', function() {
}
};
function createWithNullProto(obj) {
var result = Object.create(null);
for (var i in obj) {
result[i] = obj[i];
}
return result;
}
describe('CFFParser', function() {
var parser = new CFFParser(fontData, {});
var cff = parser.parse();
@ -226,7 +234,7 @@ describe('font', function() {
]);
parser.bytes = bytes;
var encoding = parser.parseEncoding(2, {}, new CFFStrings(), null);
expect(encoding.encoding).toEqual({0x8: 1});
expect(encoding.encoding).toEqual(createWithNullProto({0x8: 1}));
});
it('parses encoding format 1', function() {
@ -239,7 +247,8 @@ describe('font', function() {
]);
parser.bytes = bytes;
var encoding = parser.parseEncoding(2, {}, new CFFStrings(), null);
expect(encoding.encoding).toEqual({0x7: 0x01, 0x08: 0x02});
expect(encoding.encoding).toEqual(
createWithNullProto({0x7: 0x01, 0x08: 0x02}));
});
it('parses fdselect format 0', function() {