Merge pull request #12171 from Snuffleupagus/unittest-shall_fail_rendering

Attempt to reduce intermittent failures in the "multiple render() on the same canvas" unit-test
This commit is contained in:
Tim van der Meij 2020-08-05 00:02:39 +02:00 committed by GitHub
commit 02bcc25b9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1826,6 +1826,8 @@ describe("api", function () {
});
it("multiple render() on the same canvas", function (done) {
const optionalContentConfigPromise = pdfDocument.getOptionalContentConfig();
var viewport = page.getViewport({ scale: 1 });
var canvasAndCtx = CanvasFactory.create(viewport.width, viewport.height);
@ -1833,11 +1835,13 @@ describe("api", function () {
canvasContext: canvasAndCtx.context,
canvasFactory: CanvasFactory,
viewport,
optionalContentConfigPromise,
});
var renderTask2 = page.render({
canvasContext: canvasAndCtx.context,
canvasFactory: CanvasFactory,
viewport,
optionalContentConfigPromise,
});
Promise.all([