mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Removes hijack describe() hack from unit tests.
This commit is contained in:
parent
44c63bca28
commit
879340d741
3 changed files with 26 additions and 38 deletions
|
@ -93,12 +93,6 @@ function initializePDFJS(callback) {
|
|||
// Configure the worker.
|
||||
displayGlobal.PDFJS.workerSrc = '../../src/worker_loader.js';
|
||||
|
||||
// Release describe() calls.
|
||||
window.describe = oldDescribe;
|
||||
describeQueue.forEach(function (args) {
|
||||
oldDescribe.apply(window, args);
|
||||
});
|
||||
|
||||
callback();
|
||||
});
|
||||
}
|
||||
|
@ -204,9 +198,3 @@ function initializePDFJS(callback) {
|
|||
}
|
||||
}());
|
||||
|
||||
// Hacking describe() to wait for PDFJS to be loaded, since Jasmine executes
|
||||
// it without waiting for libs to be loaded and fails to use PDFJS members.
|
||||
var oldDescribe = window.describe, describeQueue = [];
|
||||
window.describe = function () {
|
||||
describeQueue.push(Array.prototype.slice.call(arguments, 0));
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue