Merge pull request #321 from kkujala/master
Refactor the lines that are over 80 characters long in driver.js.
This commit is contained in:
commit
b49a0f6b63
@ -32,7 +32,8 @@ function load() {
|
|||||||
|
|
||||||
log('load...\n');
|
log('load...\n');
|
||||||
|
|
||||||
log('Harness thinks this browser is "' + browser + '" with path "' + appPath + '"\n');
|
log('Harness thinks this browser is "' + browser + '" with path "' +
|
||||||
|
appPath + '"\n');
|
||||||
log('Fetching manifest "' + manifestFile + '"... ');
|
log('Fetching manifest "' + manifestFile + '"... ');
|
||||||
|
|
||||||
var r = new XMLHttpRequest();
|
var r = new XMLHttpRequest();
|
||||||
@ -99,7 +100,8 @@ function nextPage(task, loadError) {
|
|||||||
var page = null;
|
var page = null;
|
||||||
if (!failure) {
|
if (!failure) {
|
||||||
try {
|
try {
|
||||||
log(' loading page ' + task.pageNum + '/' + task.pdfDoc.numPages + '... ');
|
log(' loading page ' + task.pageNum + '/' + task.pdfDoc.numPages +
|
||||||
|
'... ');
|
||||||
ctx = canvas.getContext('2d');
|
ctx = canvas.getContext('2d');
|
||||||
page = task.pdfDoc.getPage(task.pageNum);
|
page = task.pdfDoc.getPage(task.pageNum);
|
||||||
|
|
||||||
@ -114,8 +116,8 @@ function nextPage(task, loadError) {
|
|||||||
page.startRendering(
|
page.startRendering(
|
||||||
ctx,
|
ctx,
|
||||||
function(e) {
|
function(e) {
|
||||||
snapshotCurrentPage(page, task,
|
snapshotCurrentPage(page, task, (!failure && e) ?
|
||||||
(!failure && e) ? ('render : ' + e) : failure);
|
('render : ' + e) : failure);
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
failure = 'page setup : ' + e.toString();
|
failure = 'page setup : ' + e.toString();
|
||||||
|
Loading…
Reference in New Issue
Block a user