Merge pull request #3311 from brendandahl/wrap-driver

Wrap driver code in closure.
This commit is contained in:
Yury Delendik 2013-05-30 17:02:28 -07:00
commit 13d4f3b7cd

View File

@ -21,6 +21,7 @@
/* /*
* A Test Driver for PDF.js * A Test Driver for PDF.js
*/ */
(function DriverClosure() {
// Disable worker support for running test as // Disable worker support for running test as
// https://github.com/mozilla/pdf.js/pull/764#issuecomment-2638944 // https://github.com/mozilla/pdf.js/pull/764#issuecomment-2638944
@ -43,7 +44,7 @@ function queryParams() {
return params; return params;
} }
function load() { window.load = function load() {
var params = queryParams(); var params = queryParams();
browser = params.browser; browser = params.browser;
var manifestFile = params.manifestFile; var manifestFile = params.manifestFile;
@ -79,7 +80,7 @@ function load() {
setTimeout(function() { setTimeout(function() {
r.send(null); r.send(null);
}, delay); }, delay);
} };
function cleanup() { function cleanup() {
// Clear out all the stylesheets since a new one is created for each font. // Clear out all the stylesheets since a new one is created for each font.
@ -416,3 +417,5 @@ function log(str) {
if (str.lastIndexOf('\n') >= 0) if (str.lastIndexOf('\n') >= 0)
checkScrolling(); checkScrolling();
} }
})(); // DriverClosure