Browse Source

PDF.js version 1.9.506 - See mozilla/pdf.js@47789b51c3b02b298f765e534b17e25ee786bd1f

master v1.9.506
pdfjsbot 7 years ago
parent
commit
bfd8cd5028
  1. 2
      bower.json
  2. 12
      build/pdf.combined.js
  3. 2
      build/pdf.combined.js.map
  4. 12
      build/pdf.js
  5. 2
      build/pdf.js.map
  6. 2
      build/pdf.min.js
  7. 4
      build/pdf.worker.js
  8. 2
      build/pdf.worker.js.map
  9. 4
      lib/display/api.js
  10. 4
      lib/display/global.js
  11. 4
      lib/pdf.js
  12. 4
      lib/pdf.worker.js
  13. 60
      lib/test/unit/api_spec.js
  14. 2
      package.json

2
bower.json

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
{
"name": "pdfjs-dist",
"version": "1.9.504",
"version": "1.9.506",
"main": [
"build/pdf.js",
"build/pdf.worker.js"

12
build/pdf.combined.js

@ -13458,8 +13458,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() { @@ -13458,8 +13458,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() {
}();
var version, build;
{
exports.version = version = '1.9.504';
exports.build = build = '0430e99d';
exports.version = version = '1.9.506';
exports.build = build = '47789b51';
}
exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort;
@ -29216,8 +29216,8 @@ exports.SVGGraphics = SVGGraphics; @@ -29216,8 +29216,8 @@ exports.SVGGraphics = SVGGraphics;
"use strict";
var pdfjsVersion = '1.9.504';
var pdfjsBuild = '0430e99d';
var pdfjsVersion = '1.9.506';
var pdfjsBuild = '47789b51';
var pdfjsSharedUtil = __w_pdfjs_require__(0);
var pdfjsDisplayGlobal = __w_pdfjs_require__(98);
var pdfjsDisplayAPI = __w_pdfjs_require__(55);
@ -35079,8 +35079,8 @@ if (!_global_scope2.default.PDFJS) { @@ -35079,8 +35079,8 @@ if (!_global_scope2.default.PDFJS) {
}
var PDFJS = _global_scope2.default.PDFJS;
{
PDFJS.version = '1.9.504';
PDFJS.build = '0430e99d';
PDFJS.version = '1.9.506';
PDFJS.build = '47789b51';
}
PDFJS.pdfBug = false;
if (PDFJS.verbosity !== undefined) {

2
build/pdf.combined.js.map

File diff suppressed because one or more lines are too long

12
build/pdf.js

@ -4185,8 +4185,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() { @@ -4185,8 +4185,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() {
}();
var version, build;
{
exports.version = version = '1.9.504';
exports.build = build = '0430e99d';
exports.version = version = '1.9.506';
exports.build = build = '47789b51';
}
exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort;
@ -7064,8 +7064,8 @@ exports.SVGGraphics = SVGGraphics; @@ -7064,8 +7064,8 @@ exports.SVGGraphics = SVGGraphics;
"use strict";
var pdfjsVersion = '1.9.504';
var pdfjsBuild = '0430e99d';
var pdfjsVersion = '1.9.506';
var pdfjsBuild = '47789b51';
var pdfjsSharedUtil = __w_pdfjs_require__(0);
var pdfjsDisplayGlobal = __w_pdfjs_require__(82);
var pdfjsDisplayAPI = __w_pdfjs_require__(48);
@ -12927,8 +12927,8 @@ if (!_global_scope2.default.PDFJS) { @@ -12927,8 +12927,8 @@ if (!_global_scope2.default.PDFJS) {
}
var PDFJS = _global_scope2.default.PDFJS;
{
PDFJS.version = '1.9.504';
PDFJS.build = '0430e99d';
PDFJS.version = '1.9.506';
PDFJS.build = '47789b51';
}
PDFJS.pdfBug = false;
if (PDFJS.verbosity !== undefined) {

2
build/pdf.js.map

File diff suppressed because one or more lines are too long

2
build/pdf.min.js vendored

File diff suppressed because one or more lines are too long

4
build/pdf.worker.js vendored

@ -24517,8 +24517,8 @@ exports.getUnicodeForGlyph = getUnicodeForGlyph; @@ -24517,8 +24517,8 @@ exports.getUnicodeForGlyph = getUnicodeForGlyph;
"use strict";
var pdfjsVersion = '1.9.504';
var pdfjsBuild = '0430e99d';
var pdfjsVersion = '1.9.506';
var pdfjsBuild = '47789b51';
var pdfjsCoreWorker = __w_pdfjs_require__(62);
exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler;

2
build/pdf.worker.js.map vendored

File diff suppressed because one or more lines are too long

4
lib/display/api.js

@ -1581,8 +1581,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() { @@ -1581,8 +1581,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() {
}();
var version, build;
{
exports.version = version = '1.9.504';
exports.build = build = '0430e99d';
exports.version = version = '1.9.506';
exports.build = build = '47789b51';
}
exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort;

4
lib/display/global.js

@ -45,8 +45,8 @@ if (!_global_scope2.default.PDFJS) { @@ -45,8 +45,8 @@ if (!_global_scope2.default.PDFJS) {
}
var PDFJS = _global_scope2.default.PDFJS;
{
PDFJS.version = '1.9.504';
PDFJS.build = '0430e99d';
PDFJS.version = '1.9.506';
PDFJS.build = '47789b51';
}
PDFJS.pdfBug = false;
if (PDFJS.verbosity !== undefined) {

4
lib/pdf.js

@ -14,8 +14,8 @@ @@ -14,8 +14,8 @@
*/
'use strict';
var pdfjsVersion = '1.9.504';
var pdfjsBuild = '0430e99d';
var pdfjsVersion = '1.9.506';
var pdfjsBuild = '47789b51';
var pdfjsSharedUtil = require('./shared/util.js');
var pdfjsDisplayGlobal = require('./display/global.js');
var pdfjsDisplayAPI = require('./display/api.js');

4
lib/pdf.worker.js vendored

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
*/
'use strict';
var pdfjsVersion = '1.9.504';
var pdfjsBuild = '0430e99d';
var pdfjsVersion = '1.9.506';
var pdfjsBuild = '47789b51';
var pdfjsCoreWorker = require('./core/worker.js');
exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler;

60
lib/test/unit/api_spec.js

@ -735,6 +735,66 @@ describe('api', function () { @@ -735,6 +735,66 @@ describe('api', function () {
done.fail(reason);
});
});
describe('Cross-origin', function () {
var loadingTask;
function _checkCanLoad(expectSuccess, filename, options) {
if ((0, _util.isNodeJS)()) {
pending('Cannot simulate cross-origin requests in Node.js');
}
var params = (0, _test_utils.buildGetDocumentParams)(filename, options);
var url = new URL(params.url);
if (url.hostname === 'localhost') {
url.hostname = '127.0.0.1';
} else if (params.url.hostname === '127.0.0.1') {
url.hostname = 'localhost';
} else {
pending('Can only run cross-origin test on localhost!');
}
params.url = url.href;
loadingTask = (0, _api.getDocument)(params);
return loadingTask.promise.then(function (pdf) {
return pdf.destroy();
}).then(function () {
expect(expectSuccess).toEqual(true);
}, function (error) {
if (expectSuccess) {
expect(error).toEqual('There should not be any error');
}
expect(expectSuccess).toEqual(false);
});
}
function testCanLoad(filename, options) {
return _checkCanLoad(true, filename, options);
}
function testCannotLoad(filename, options) {
return _checkCanLoad(false, filename, options);
}
afterEach(function (done) {
if (loadingTask) {
loadingTask.destroy().then(done);
} else {
done();
}
});
it('server disallows cors', function (done) {
testCannotLoad('basicapi.pdf').then(done);
});
it('server allows cors without credentials, default withCredentials', function (done) {
testCanLoad('basicapi.pdf?cors=withoutCredentials').then(done);
});
it('server allows cors without credentials, and withCredentials=false', function (done) {
testCanLoad('basicapi.pdf?cors=withoutCredentials', { withCredentials: false }).then(done);
});
it('server allows cors without credentials, but withCredentials=true', function (done) {
testCannotLoad('basicapi.pdf?cors=withoutCredentials', { withCredentials: true }).then(done);
});
it('server allows cors with credentials, and withCredentials=true', function (done) {
testCanLoad('basicapi.pdf?cors=withCredentials', { withCredentials: true }).then(done);
});
it('server allows cors with credentials, and withCredentials=false', function (done) {
testCanLoad('basicapi.pdf?cors=withCredentials', { withCredentials: false }).then(done);
});
});
});
describe('Page', function () {
var loadingTask;

2
package.json

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
{
"name": "pdfjs-dist",
"version": "1.9.504",
"version": "1.9.506",
"main": "build/pdf.js",
"description": "Generic build of Mozilla's PDF.js library.",
"keywords": [

Loading…
Cancel
Save