From: Kalervo Kujala Date: Sat, 6 Aug 2011 19:54:16 +0000 (+0300) Subject: Use strict in driver.js. X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=17e02e3c39b6af3468e0f857adccdb03d98e39a7;p=pdf.js.git Use strict in driver.js. And declare undeclared variables. --- diff --git a/test/driver.js b/test/driver.js index a6b0b1d..8d25539 100644 --- a/test/driver.js +++ b/test/driver.js @@ -5,6 +5,8 @@ * A Test Driver for PDF.js */ +'use strict'; + var appPath, browser, canvas, currentTaskIdx, manifest, stdout; function queryParams() { @@ -21,7 +23,7 @@ function queryParams() { function load() { var params = queryParams(); browser = params.browser; - manifestFile = params.manifestFile; + var manifestFile = params.manifestFile; appPath = params.path; canvas = document.createElement("canvas"); @@ -134,7 +136,7 @@ function snapshotCurrentPage(page, task, failure) { log("done"+ (failure ? " (failed!: "+ failure +")" : "") +"\n"); // Set up the next request - backoff = (inFlightRequests > 0) ? inFlightRequests * 10 : 0; + var backoff = (inFlightRequests > 0) ? inFlightRequests * 10 : 0; setTimeout(function() { ++task.pageNum, nextPage(task); }, @@ -209,4 +211,4 @@ function checkScrolling() { function log(str) { stdout.innerHTML += str; checkScrolling(); -} \ No newline at end of file +}