Files
openlayers/tests/Protocol.html
2008-08-05 13:59:12 +00:00

34 lines
916 B
HTML

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