(function(){ var boot = // zero to many scripts to load a configuration and/or loader. // i.e. path-to-util/doh/runner.html?boots=path-to/config.js,path-to/require.js ["../../dojo/dojo.js"], standardDojoBoot = boot, test = // zero to many AMD modules and/or URLs to load; provided by csv URL query parameter="test" // For example, the URL... // // path-to-util/doh/runner.html?test=doh/selfTest,my/path/test.js // // ...will load... // // * the AMD module doh/selfTest // * the plain old Javascript resource my/path/test.js // ["dojo/tests/module"], paths = // zero to many path items to pass to the AMD loader; provided by semicolon separated values // for URL query parameter="paths"; each path item has the form , // i.e. path-to-util/doh/runner.html?paths=my/from/path,my/to/path;my/from/path2,my/to/path2 {}, dohPlugins = // Semicolon separated list of files to load before the tests. // Idea is to override aspects of DOH for reporting purposes. "", breakOnError = // boolean; instructs doh to call the debugger upon a test failures; this can be helpful when // trying to isolate exactly where the test failed false, async = // boolean; config require.async==true before loading boot; this will have the effect of making // version 1.7+ dojo bootstrap/loader operating in async mode false, sandbox = // boolean; use a loader configuration that sandboxes the dojo and dojox objects used by doh false, trim = function(text){ if(text instanceof Array){ for (var result= [], i= 0; i"':\(\)]/g, ""); // replace() to avoid XSS attack //Avoid URLs that use the same protocol but on other domains, for security reasons. if (value.indexOf("//") === 0 || value.indexOf("\\\\") === 0) { throw "Insupported URL"; } switch(name){ // Note: // * dojoUrl is deprecated, and is a synonym for boot // * testUrl is deprecated, and is a synonym for test // * testModule is deprecated, and is a synonym for test (dots are automatically replaced with slashes) // * registerModulePath is deprecated, and is a synonym for paths case "boot": case "dojoUrl": boot= trim(value.split(",")); break; case "test": case "testUrl": test= trim(value.split(",")); break; case "testModule": test= trim(value.replace(/\./g, "/").split(",")); break; // registerModulePath is deprecated; use "paths" case "registerModulePath": case "paths": for(var path, modules = value.split(";"), i= 0; i