mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-21 07:38:07 +02:00
Merge remote-tracking branch 'mozilla/version-2.0' into v2
This commit is contained in:
commit
b4e25fb2e8
18 changed files with 66 additions and 252 deletions
|
@ -255,8 +255,6 @@ var Driver = (function DriverClosure() { // eslint-disable-line no-unused-vars
|
|||
PDFJS.cMapUrl = '../external/bcmaps/';
|
||||
PDFJS.enableStats = true;
|
||||
PDFJS.imageResourcesPath = '/web/images/';
|
||||
// Opt-in to using the latest API.
|
||||
PDFJS.pdfjsNext = true;
|
||||
|
||||
// Set the passed options
|
||||
this.inflight = options.inflight;
|
||||
|
|
|
@ -38,7 +38,6 @@ describe('api', function() {
|
|||
|
||||
beforeAll(function(done) {
|
||||
if (isNodeJS()) {
|
||||
PDFJS.pdfjsNext = true;
|
||||
// NOTE: To support running the canvas-related tests in Node.js,
|
||||
// a `NodeCanvasFactory` would need to be added (in test_utils.js).
|
||||
} else {
|
||||
|
@ -684,7 +683,7 @@ describe('api', function() {
|
|||
it('gets javascript', function(done) {
|
||||
var promise = doc.getJavaScript();
|
||||
promise.then(function (data) {
|
||||
expect(data).toEqual([]);
|
||||
expect(data).toEqual(null);
|
||||
done();
|
||||
}).catch(function (reason) {
|
||||
done.fail(reason);
|
||||
|
|
|
@ -17,7 +17,6 @@ import { buildGetDocumentParams } from './test_utils';
|
|||
import { DOMCanvasFactory } from '../../src/display/dom_utils';
|
||||
import { getDocument } from '../../src/display/api';
|
||||
import { isNodeJS } from '../../src/shared/util';
|
||||
import { PDFJS } from '../../src/display/global';
|
||||
|
||||
function getTopLeftPixel(canvasContext) {
|
||||
let imgData = canvasContext.getImageData(0, 0, 1, 1);
|
||||
|
@ -38,7 +37,6 @@ describe('custom canvas rendering', function() {
|
|||
|
||||
beforeAll(function(done) {
|
||||
if (isNodeJS()) {
|
||||
PDFJS.pdfjsNext = true;
|
||||
// NOTE: To support running the canvas-related tests in Node.js,
|
||||
// a `NodeCanvasFactory` would need to be added (in test_utils.js).
|
||||
} else {
|
||||
|
|
|
@ -90,8 +90,6 @@ function initializePDFJS(callback) {
|
|||
|
||||
// Configure the worker.
|
||||
displayGlobal.PDFJS.workerSrc = '../../build/generic/build/pdf.worker.js';
|
||||
// Opt-in to using the latest API.
|
||||
displayGlobal.PDFJS.pdfjsNext = true;
|
||||
|
||||
callback();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue