Files
openlayers/test/api.html
2012-06-23 21:53:45 +02:00

99 lines
3.4 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>OL Spec Runner</title>
<link rel="shortcut icon" type="image/png" href="jasmine-1.2.0/jasmine_favicon.png">
<link rel="stylesheet" type="text/css" href="jasmine-1.2.0/jasmine.css">
<script type="text/javascript" src="jasmine-1.2.0/jasmine.js"></script>
<script type="text/javascript" src="jasmine-1.2.0/jasmine-html.js"></script>
<!-- include source files here... -->
<script type="text/javascript">
// the following code includes the sourc-files of OpenLayers as they are
// defined in ol.js.
//
// You can control in which form the source will be loaded by passing
// URL-parameters:
//
// - host
// where the plovr compiler is running, if not passed this defaults to the
// current host on port 9810
//
// - mode
// which mode of compilation should be applied. Common values for this are
// RAW, SIMPLE or ADVANCED. If not provided, SIMPLE is used.
(function(doc, l){
var hostRegex = /[\\?&]host=([^&#]*)/,
modeRegex = /[\\?&]mode=([^&#]*)/,
hostResult = hostRegex.exec(l.href),
modeResult = modeRegex.exec(l.href),
host = (hostResult && hostResult[1])
? hostResult[1]
: (l.host)
? l.host + ':9810'
: 'localhost:9810',
mode = (modeResult && modeResult[1])
? modeResult[1]
: 'SIMPLE',
script = '<sc' + 'ript type="text/javascript" '
+ 'src="http://' + host + '/compile?id=ol&amp;mode=' + mode + '">'
+ '</scr' + 'ipt>';
doc.write(script);
})(document, location);
</script>
<!-- common jasmine extensions -->
<script type="text/javascript" src="jasmine-extensions.js"></script>
<!-- include spec files here... -->
<script type="text/javascript" src="spec/api/bounds.test.js"></script>
<script type="text/javascript" src="spec/api/geom/geom.test.js"></script>
<script type="text/javascript" src="spec/api/geom/point.test.js"></script>
<script type="text/javascript" src="spec/api/geom/multipoint.test.js"></script>
<script type="text/javascript" src="spec/api/geom/linestring.test.js"></script>
<script type="text/javascript" src="spec/api/geom/collection.test.js"></script>
<script type="text/javascript" src="spec/api/loc.test.js"></script>
<script type="text/javascript" src="spec/api/map.test.js"></script>
<script type="text/javascript" src="spec/api/projection.test.js"></script>
<script type="text/javascript" src="spec/api/layer/xyz.test.js"></script>
<script type="text/javascript" src="spec/api/layer/osm.test.js"></script>
<script type="text/javascript" src="spec/api/layer/wms.test.js"></script>
<script type="text/javascript" src="spec/api/feature.test.js"></script>
<script type="text/javascript" src="spec/api/popup.test.js"></script>
<script type="text/javascript">
(function() {
var jasmineEnv = jasmine.getEnv();
jasmineEnv.updateInterval = 1000;
var htmlReporter = new jasmine.HtmlReporter();
jasmineEnv.addReporter(htmlReporter);
jasmineEnv.specFilter = function(spec) {
return htmlReporter.specFilter(spec);
};
var currentWindowOnload = window.onload;
window.onload = function() {
if (currentWindowOnload) {
currentWindowOnload();
}
execJasmine();
};
function execJasmine() {
jasmineEnv.execute();
}
})();
</script>
</head>
<body>
</body>
</html>