diff --git a/test/driver.js b/test/driver.js index f0f39ac7e..153737557 100644 --- a/test/driver.js +++ b/test/driver.js @@ -64,7 +64,8 @@ var rasterizeTextLayer = (function rasterizeTextLayerClosure() { return textLayerStylePromise; } - function rasterizeTextLayer(ctx, viewport, textContent) { + function rasterizeTextLayer(ctx, viewport, textContent, + enhanceTextSelection) { return new Promise(function (resolve) { // Building SVG with size of the viewport. var svg = document.createElementNS(SVG_NS, 'svg:svg'); @@ -470,12 +471,13 @@ var Driver = (function DriverClosure() { var textLayerContext = textLayerCanvas.getContext('2d'); textLayerContext.clearRect(0, 0, textLayerCanvas.width, textLayerCanvas.height); + var enhanceText = !!task.enhance; // The text builder will draw its content on the test canvas initPromise = page.getTextContent({ normalizeWhitespace: true, }).then(function(textContent) { return rasterizeTextLayer(textLayerContext, viewport, - textContent); + textContent, enhanceText); }); } else { textLayerCanvas = null; diff --git a/test/test_manifest.json b/test/test_manifest.json index 8816c1706..b6e51a24f 100644 --- a/test/test_manifest.json +++ b/test/test_manifest.json @@ -23,6 +23,13 @@ "rounds": 1, "type": "text" }, + { "id": "tracemonkey-text-enhance", + "file": "pdfs/tracemonkey.pdf", + "md5": "9a192d8b1a7dc652a19835f6f08098bd", + "rounds": 1, + "enhance": true, + "type": "text" + }, { "id": "issue3925", "file": "pdfs/issue3925.pdf", "md5": "c5c895deecf7a7565393587e0d61be2b", @@ -331,12 +338,28 @@ "lastPage": 4, "type": "text" }, + { "id": "taro-text-enhance", + "file": "pdfs/TaroUTR50SortedList112.pdf", + "md5": "ce63eab622ff473a43f8a8de85ef8a46", + "link":true, + "rounds": 1, + "lastPage": 4, + "enhance": true, + "type": "text" + }, { "id": "rotated-text", "file": "pdfs/rotated.pdf", "md5": "aed187f53e969ccdcbab0bb4c59f9e46", "rounds": 1, "type": "text" }, + { "id": "rotated-text-enhance", + "file": "pdfs/rotated.pdf", + "md5": "aed187f53e969ccdcbab0bb4c59f9e46", + "rounds": 1, + "enhance": true, + "type": "text" + }, { "id": "issue3115", "file": "pdfs/issue3115r.pdf",