Merge branch '2.12'

This commit is contained in:
Éric Lemoine
2012-04-11 12:58:06 +02:00
6 changed files with 28 additions and 8 deletions

View File

@@ -98,6 +98,25 @@
map.destroy();
});
}
function test_attribution_notempty(t) {
t.plan(1);
var log = [];
var map = new OpenLayers.Map("map");
layer = new OpenLayers.Layer.Bing(OpenLayers.Util.applyDefaults({type: 'Road'}, options));
map.addLayer(layer);
var format = OpenLayers.String.format;
OpenLayers.String.format = function(tpl, options) {
log.push(options.copyrights);
}
map.zoomToExtent(new OpenLayers.Bounds(-14768652, 4492113, -12263964, 5744457));
t.delay_call(2, function() {
t.ok(log.join("") !== "", "Copyright not empty");
OpenLayers.String.format = format;
map.destroy();
});
}
function test_getXYZ(t) {
t.plan(1);

View File

@@ -1,11 +1,11 @@
<html>
<head>
<script src="some/path/OpenLayers.js"></script>
<script src="some/OpenLayers/path/OpenLayers.js"></script>
<script src="../lib/OpenLayers/SingleFile.js"></script>
<script type="text/javascript">
function test_OpenLayers(t) {
t.plan(1);
t.eq(OpenLayers._getScriptLocation(), "some/path/",
t.eq(OpenLayers._getScriptLocation(), "some/OpenLayers/path/",
"Script location correctly detected (OpenLayers.js).");
}
</script>

View File

@@ -1,11 +1,11 @@
<html>
<head>
<script src="some/path/OpenLayers.light.js"></script>
<script src="some/OpenLayers/path/OpenLayers.light.js"></script>
<script src="../lib/OpenLayers/SingleFile.js"></script>
<script type="text/javascript">
function test_OpenLayers(t) {
t.plan(1);
t.eq(OpenLayers._getScriptLocation(), "some/path/",
t.eq(OpenLayers._getScriptLocation(), "some/OpenLayers/path/",
"Script location correctly detected (OpenLayers.light.js)<29>.");
}
</script>

View File

@@ -1,11 +1,11 @@
<html>
<head>
<script src="some/path/OpenLayers.light.debug.js"></script>
<script src="some/OpenLayers/path/OpenLayers.light.debug.js"></script>
<script src="../lib/OpenLayers/SingleFile.js"></script>
<script type="text/javascript">
function test_OpenLayers(t) {
t.plan(1);
t.eq(OpenLayers._getScriptLocation(), "some/path/",
t.eq(OpenLayers._getScriptLocation(), "some/OpenLayers/path/",
"Script location correctly detected (OpenLayers.light.debug.js).");
}
</script>