From 9d62ff80cab3306ff138b3547733594a79212848 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Thu, 6 Apr 2017 13:17:52 +0200 Subject: [PATCH] Actually skip pages included in the `skipPages` array when running tests, rather than creating empty 1x1 canvases (issue 8241) Considering how extremely simple this patch turned out to be, I'm almost worried that I completely misunderstood why the current code looks like it does... --- test/driver.js | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/test/driver.js b/test/driver.js index 7aba45fa4..5bad1fee6 100644 --- a/test/driver.js +++ b/test/driver.js @@ -446,18 +446,9 @@ var Driver = (function DriverClosure() { // eslint-disable-line no-unused-vars if (task.skipPages && task.skipPages.indexOf(task.pageNum) >= 0) { this._log(' Skipping page ' + task.pageNum + '/' + - task.pdfDoc.numPages + '... '); - - // Empty the canvas - this.canvas.width = 1; - this.canvas.height = 1; - ctx = this.canvas.getContext('2d', {alpha: false}); - ctx.save(); - ctx.fillStyle = 'white'; - ctx.fillRect(0, 0, 1, 1); - ctx.restore(); - - this._snapshot(task, ''); + task.pdfDoc.numPages + '...\n'); + task.pageNum++; + this._nextPage(task); return; }