Use strict in driver.js.

And declare undeclared variables.
This commit is contained in:
Kalervo Kujala 2011-08-06 22:54:16 +03:00
parent 8110c585b2
commit 17e02e3c39

View File

@ -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();
}
}