Using pre-built code for testing.
This commit is contained in:
parent
263479fd6a
commit
b66b705ed7
12
gulpfile.js
12
gulpfile.js
@ -1055,22 +1055,22 @@ gulp.task('publish', ['generic'], function (done) {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('test', function () {
|
gulp.task('test', ['generic'], function () {
|
||||||
return streamqueue({ objectMode: true },
|
return streamqueue({ objectMode: true },
|
||||||
createTestSource('unit'), createTestSource('browser'));
|
createTestSource('unit'), createTestSource('browser'));
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('bottest', function () {
|
gulp.task('bottest', ['generic'], function () {
|
||||||
return streamqueue({ objectMode: true },
|
return streamqueue({ objectMode: true },
|
||||||
createTestSource('unit'), createTestSource('font'),
|
createTestSource('unit'), createTestSource('font'),
|
||||||
createTestSource('browser (no reftest)'));
|
createTestSource('browser (no reftest)'));
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('browsertest', function () {
|
gulp.task('browsertest', ['generic'], function () {
|
||||||
return createTestSource('browser');
|
return createTestSource('browser');
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('unittest', function () {
|
gulp.task('unittest', ['generic'], function () {
|
||||||
return createTestSource('unit');
|
return createTestSource('unit');
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -1078,11 +1078,11 @@ gulp.task('fonttest', function () {
|
|||||||
return createTestSource('font');
|
return createTestSource('font');
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('makeref', function (done) {
|
gulp.task('makeref', ['generic'], function (done) {
|
||||||
makeRef(done);
|
makeRef(done);
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('botmakeref', function (done) {
|
gulp.task('botmakeref', ['generic'], function (done) {
|
||||||
makeRef(done, true);
|
makeRef(done, true);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -68,4 +68,5 @@
|
|||||||
displayDOMUtils.RenderingCancelledException;
|
displayDOMUtils.RenderingCancelledException;
|
||||||
exports.getFilenameFromUrl = displayDOMUtils.getFilenameFromUrl;
|
exports.getFilenameFromUrl = displayDOMUtils.getFilenameFromUrl;
|
||||||
exports.addLinkAttributes = displayDOMUtils.addLinkAttributes;
|
exports.addLinkAttributes = displayDOMUtils.addLinkAttributes;
|
||||||
|
exports.StatTimer = sharedUtil.StatTimer;
|
||||||
}));
|
}));
|
||||||
|
@ -57,3 +57,4 @@ exports.RenderingCancelledException =
|
|||||||
pdfjsDisplayDOMUtils.RenderingCancelledException;
|
pdfjsDisplayDOMUtils.RenderingCancelledException;
|
||||||
exports.getFilenameFromUrl = pdfjsDisplayDOMUtils.getFilenameFromUrl;
|
exports.getFilenameFromUrl = pdfjsDisplayDOMUtils.getFilenameFromUrl;
|
||||||
exports.addLinkAttributes = pdfjsDisplayDOMUtils.addLinkAttributes;
|
exports.addLinkAttributes = pdfjsDisplayDOMUtils.addLinkAttributes;
|
||||||
|
exports.StatTimer = pdfjsSharedUtil.StatTimer;
|
||||||
|
@ -12,13 +12,15 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
/* globals PDFJS, pdfjsSharedUtil */
|
/* globals PDFJS, pdfjsDistBuildPdf */
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var WAITING_TIME = 100; // ms
|
var WAITING_TIME = 100; // ms
|
||||||
var PDF_TO_CSS_UNITS = 96.0 / 72.0;
|
var PDF_TO_CSS_UNITS = 96.0 / 72.0;
|
||||||
|
|
||||||
|
var StatTimer = pdfjsDistBuildPdf.StatTimer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @class
|
* @class
|
||||||
*/
|
*/
|
||||||
@ -258,7 +260,7 @@ var Driver = (function DriverClosure() { // eslint-disable-line no-unused-vars
|
|||||||
*/
|
*/
|
||||||
function Driver(options) {
|
function Driver(options) {
|
||||||
// Configure the global PDFJS object
|
// Configure the global PDFJS object
|
||||||
PDFJS.workerSrc = '../src/worker_loader.js';
|
PDFJS.workerSrc = '../build/generic/build/pdf.worker.js';
|
||||||
PDFJS.cMapPacked = true;
|
PDFJS.cMapPacked = true;
|
||||||
PDFJS.cMapUrl = '../external/bcmaps/';
|
PDFJS.cMapUrl = '../external/bcmaps/';
|
||||||
PDFJS.enableStats = true;
|
PDFJS.enableStats = true;
|
||||||
@ -547,7 +549,7 @@ var Driver = (function DriverClosure() { // eslint-disable-line no-unused-vars
|
|||||||
}
|
}
|
||||||
page.cleanup();
|
page.cleanup();
|
||||||
task.stats = page.stats;
|
task.stats = page.stats;
|
||||||
page.stats = new pdfjsSharedUtil.StatTimer();
|
page.stats = new StatTimer();
|
||||||
self._snapshot(task, error);
|
self._snapshot(task, error);
|
||||||
});
|
});
|
||||||
initPromise.then(function () {
|
initPromise.then(function () {
|
||||||
|
@ -18,8 +18,7 @@ limitations under the License.
|
|||||||
<head>
|
<head>
|
||||||
<title>PDF.js test slave</title>
|
<title>PDF.js test slave</title>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<script src="../node_modules/systemjs/dist/system.js"></script>
|
<script src="../build/generic/build/pdf.js"></script>
|
||||||
<script src="../systemjs.config.js"></script>
|
|
||||||
<script src="driver.js"></script>
|
<script src="driver.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
@ -32,14 +31,6 @@ limitations under the License.
|
|||||||
<div id="end"></div>
|
<div id="end"></div>
|
||||||
</body>
|
</body>
|
||||||
<script>
|
<script>
|
||||||
Promise.all([SystemJS.import('pdfjs/display/api'),
|
|
||||||
SystemJS.import('pdfjs/display/text_layer'),
|
|
||||||
SystemJS.import('pdfjs/display/annotation_layer'),
|
|
||||||
SystemJS.import('pdfjs/display/global'),
|
|
||||||
SystemJS.import('pdfjs/shared/util')])
|
|
||||||
.then(function (modules) {
|
|
||||||
window.pdfjsSharedUtil = modules[4];
|
|
||||||
|
|
||||||
var driver = new Driver({
|
var driver = new Driver({
|
||||||
disableScrolling: document.getElementById('disableScrolling'),
|
disableScrolling: document.getElementById('disableScrolling'),
|
||||||
inflight: document.getElementById('inflight'),
|
inflight: document.getElementById('inflight'),
|
||||||
@ -47,6 +38,5 @@ limitations under the License.
|
|||||||
end: document.getElementById('end')
|
end: document.getElementById('end')
|
||||||
});
|
});
|
||||||
driver.run();
|
driver.run();
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
</html>
|
</html>
|
||||||
|
@ -60,7 +60,7 @@ function initializePDFJS(callback) {
|
|||||||
var displayGlobal = modules[0];
|
var displayGlobal = modules[0];
|
||||||
|
|
||||||
// Configure the worker.
|
// Configure the worker.
|
||||||
displayGlobal.PDFJS.workerSrc = '../../src/worker_loader.js';
|
displayGlobal.PDFJS.workerSrc = '../../build/generic/build/pdf.worker.js';
|
||||||
// Opt-in to using the latest API.
|
// Opt-in to using the latest API.
|
||||||
displayGlobal.PDFJS.pdfjsNext = true;
|
displayGlobal.PDFJS.pdfjsNext = true;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user