Files
openlayers/tests/Strategy.html
2008-08-04 12:25:47 +00:00

33 lines
823 B
HTML

<html>
<head>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
function test_initialize(t) {
t.plan(2);
var options = {};
var strategy = new OpenLayers.Strategy(options);
t.ok(strategy instanceof OpenLayers.Strategy,
"new OpenLayers.Strategy returns object" );
t.eq(strategy.options, options, "constructor sets this.options");
}
function test_destroy(t) {
t.plan(2);
var strategy = new OpenLayers.Strategy({
options: {foo: 'bar'},
layer: 'foo'
});
strategy.destroy();
t.eq(strategy.layer, null, "destroy nullify protocol.layer");
t.eq(strategy.options, null, "destroy nullify protocol.options");
}
</script>
</head>
<body>
</body>
</html>