Adds the possibility to use a built version of OpenLayers for the tests, users simply have to add '?mode=build' in the run-tests.html url

git-svn-id: http://svn.openlayers.org/trunk/openlayers@11162 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
pgiraud
2011-02-21 10:10:25 +00:00
parent 08acb65e0e
commit f84f696e31
209 changed files with 219 additions and 208 deletions

11
tests/OLLoader.js Normal file
View File

@@ -0,0 +1,11 @@
// Adding a mode parameter with "build" as value in the run-tests.html will
// make usage of the build version of the library.
var regexS = "[\\?&]mode=([^&#]*)";
var regex = new RegExp( regexS );
var href = window.parent.location.href;
var url = href.substring(0, href.lastIndexOf('/') + 1);
var results = regex.exec( href );
url += (results && results[1] == 'build') ?
"../build/OpenLayers.js" : "../lib/OpenLayers.js";
scriptTag = "<script src='" + url + "'></script>";
document.write(scriptTag);