mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 23:28:06 +02:00
Merge pull request #7171 from Snuffleupagus/remove-new-Name/Cmd
Remove the remaining usages of `new {Name,Cmd}` in favor of `{Name,Cmd}.get`
This commit is contained in:
commit
070f2d32ad
3 changed files with 11 additions and 10 deletions
|
@ -160,7 +160,7 @@ describe('cmap', function() {
|
|||
});
|
||||
});
|
||||
it('loads built in cmap', function(done) {
|
||||
var cmapPromise = CMapFactory.create(new Name('Adobe-Japan1-1'),
|
||||
var cmapPromise = CMapFactory.create(Name.get('Adobe-Japan1-1'),
|
||||
{ url: cMapUrl, packed: cMapPacked }, null);
|
||||
cmapPromise.then(function (cmap) {
|
||||
expect(cmap instanceof CMap).toEqual(true);
|
||||
|
@ -174,7 +174,7 @@ describe('cmap', function() {
|
|||
});
|
||||
});
|
||||
it('loads built in identity cmap', function(done) {
|
||||
var cmapPromise = CMapFactory.create(new Name('Identity-H'),
|
||||
var cmapPromise = CMapFactory.create(Name.get('Identity-H'),
|
||||
{ url: cMapUrl, packed: cMapPacked }, null);
|
||||
cmapPromise.then(function (cmap) {
|
||||
expect(cmap instanceof IdentityCMap).toEqual(true);
|
||||
|
|
|
@ -16,7 +16,7 @@ describe('primitives', function() {
|
|||
describe('Cmd', function() {
|
||||
it('should retain the given cmd name', function() {
|
||||
var givenCmd = 'BT';
|
||||
var cmd = new Cmd(givenCmd);
|
||||
var cmd = Cmd.get(givenCmd);
|
||||
expect(cmd.cmd).toEqual(givenCmd);
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue