Files
openlayers/test/ol.html
2013-03-14 23:33:58 +01:00

69 lines
1.9 KiB
HTML

<!DOCTYPE html>
<!--
Note: we assume that Plovr is available at <hostname>:9810, where
<hostname> is the name of the host used for loading that page. This
can be overriden by setting plovr_host in the query string. E.g.
http://localhost/ol3/test/ol.html?plovr_host=192.168.1.2:9810
-->
<html>
<head>
<title>OL Spec Runner</title>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="mocha-1.8.1/mocha.css">
</head>
<body>
<div id="mocha"></div>
<script type="text/javascript" src="jquery-1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="expect-0.2.0-ol3/expect.js"></script>
<script type="text/javascript" src="sinon-1.6.0/sinon.js"></script>
<script type="text/javascript" src="mocha-1.8.1/mocha.js"></script>
<script type="text/javascript" src="test-extensions.js"></script>
<script>
mocha.setup({
ui: 'bdd',
ignoreLeaks: true
});
</script>
<script type="text/javascript" src="../build/proj4js/lib/proj4js-combined.js"></script>
<script type="text/javascript">
(function(doc, l) {
var regexResult = /[\\?&]plovr_host=([^&#]*)/.exec(l.href);
var plovrHost = (regexResult && regexResult[1]) ?
decodeURIComponent(regexResult[1]) : l.hostname ?
l.hostname + ':9810' : 'localhost:9810';
// Create the script tag which includes the derived variables from above
var script = '<sc' + 'ript type="text/javascript" '
+ 'src="http://' + plovrHost + '/compile?id=test&mode=RAW">'
+ '</scr' + 'ipt>';
// write out the script-tag to load the compiled result
doc.write(script);
})(document, location);
</script>
<script type="text/javascript">
if (window.mochaPhantomJS) {
mochaPhantomJS.run();
} else {
mocha.run();
}
</script>
<div id="map"></div>
</body>
</html>