mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 01:58:06 +02:00
Enable running the cmap
unit-tests on Travis by utilizing a NodeCMapReaderFactory
This commit is contained in:
parent
cfaa621a05
commit
9082f08e37
5 changed files with 108 additions and 20 deletions
|
@ -12,7 +12,6 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/* globals process, __pdfjsdev_webpack__ */
|
||||
|
||||
'use strict';
|
||||
|
||||
|
@ -46,6 +45,7 @@ var error = sharedUtil.error;
|
|||
var info = sharedUtil.info;
|
||||
var warn = sharedUtil.warn;
|
||||
var setVerbosityLevel = sharedUtil.setVerbosityLevel;
|
||||
var isNodeJS = sharedUtil.isNodeJS;
|
||||
var Ref = corePrimitives.Ref;
|
||||
var LocalPdfManager = corePdfManager.LocalPdfManager;
|
||||
var NetworkPdfManager = corePdfManager.NetworkPdfManager;
|
||||
|
@ -1007,14 +1007,6 @@ function initializeWorker() {
|
|||
handler.send('ready', null);
|
||||
}
|
||||
|
||||
function isNodeJS() {
|
||||
// The if below protected by __pdfjsdev_webpack__ check from webpack parsing.
|
||||
if (typeof __pdfjsdev_webpack__ === 'undefined') {
|
||||
return typeof process === 'object' && process + '' === '[object process]';
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Worker thread (and not node.js)?
|
||||
if (typeof window === 'undefined' && !isNodeJS()) {
|
||||
initializeWorker();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue