The changed controls should also check whether they have correctly
inherited the property 'type' of the new parent class.
This commit is contained in:
@@ -25,6 +25,24 @@ function test_ZoomIn_constructor (t) {
|
||||
control.destroy();
|
||||
}
|
||||
|
||||
function test_ZoomIn_type (t) {
|
||||
t.plan( 1 );
|
||||
|
||||
// setup
|
||||
var control = new OpenLayers.Control.ZoomIn();
|
||||
|
||||
// tests
|
||||
//
|
||||
t.eq(
|
||||
control.type,
|
||||
OpenLayers.Control.TYPE_BUTTON,
|
||||
"ZoomIn control is of type OpenLayers.Control.TYPE_BUTTON"
|
||||
);
|
||||
|
||||
// tear down
|
||||
control.destroy();
|
||||
}
|
||||
|
||||
function test_ZoomIn_trigger (t) {
|
||||
t.plan( 2 );
|
||||
|
||||
|
||||
@@ -25,6 +25,24 @@ function test_ZoomOut_constructor (t) {
|
||||
control.destroy();
|
||||
}
|
||||
|
||||
function test_ZoomOut_type (t) {
|
||||
t.plan( 1 );
|
||||
|
||||
// setup
|
||||
var control = new OpenLayers.Control.ZoomOut();
|
||||
|
||||
// tests
|
||||
//
|
||||
t.eq(
|
||||
control.type,
|
||||
OpenLayers.Control.TYPE_BUTTON,
|
||||
"ZoomOut control is of type OpenLayers.Control.TYPE_BUTTON"
|
||||
);
|
||||
|
||||
// tear down
|
||||
control.destroy();
|
||||
}
|
||||
|
||||
function test_ZoomOut_trigger (t) {
|
||||
t.plan( 2 );
|
||||
|
||||
|
||||
@@ -25,6 +25,24 @@ function test_ZoomToMaxExtent_constructor (t) {
|
||||
control.destroy();
|
||||
}
|
||||
|
||||
function test_ZoomToMaxExtent_type (t) {
|
||||
t.plan( 1 );
|
||||
|
||||
// setup
|
||||
var control = new OpenLayers.Control.ZoomToMaxExtent();
|
||||
|
||||
// tests
|
||||
//
|
||||
t.eq(
|
||||
control.type,
|
||||
OpenLayers.Control.TYPE_BUTTON,
|
||||
"ZoomToMaxExtent control is of type 'OpenLayers.Control.TYPE_BUTTON'"
|
||||
);
|
||||
|
||||
// tear down
|
||||
control.destroy();
|
||||
}
|
||||
|
||||
function test_ZoomToMaxExtent_trigger (t) {
|
||||
t.plan( 2 );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user