|
Revision 7714, 0.9 kB
(checked in by fredj, 5 months ago)
|
Give the map a size to pass the tests on IE 7
|
| Line | |
|---|
| 1 |
<html> |
|---|
| 2 |
<head> |
|---|
| 3 |
<script src="../../lib/OpenLayers.js"></script> |
|---|
| 4 |
<script type="text/javascript"> |
|---|
| 5 |
|
|---|
| 6 |
function test_activate(t) { |
|---|
| 7 |
t.plan(1); |
|---|
| 8 |
var featureList = ['foo', 'bar']; |
|---|
| 9 |
|
|---|
| 10 |
var layer = new OpenLayers.Layer.Vector("Vector Layer", { |
|---|
| 11 |
strategies: [new OpenLayers.Strategy.Fixed()], |
|---|
| 12 |
|
|---|
| 13 |
// a fake protocol |
|---|
| 14 |
protocol: { |
|---|
| 15 |
read: function(options) { |
|---|
| 16 |
options.callback.call(options.scope, {features: featureList}); |
|---|
| 17 |
} |
|---|
| 18 |
}, |
|---|
| 19 |
|
|---|
| 20 |
addFeatures: function(features) { |
|---|
| 21 |
t.eq(features, featureList, "Features added to the layer"); |
|---|
| 22 |
} |
|---|
| 23 |
}); |
|---|
| 24 |
|
|---|
| 25 |
var map = new OpenLayers.Map('map'); |
|---|
| 26 |
map.addLayer(layer); |
|---|
| 27 |
} |
|---|
| 28 |
|
|---|
| 29 |
</script> |
|---|
| 30 |
</head> |
|---|
| 31 |
<body> |
|---|
| 32 |
<div id="map" style="width: 400px; height: 200px" /> |
|---|
| 33 |
</body> |
|---|
| 34 |
</html> |
|---|