fix up tests, remove _01_. (Closes #1387)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@6724 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2008-03-31 05:31:28 +00:00
parent 0d6174db7f
commit 3e348f450e
65 changed files with 373 additions and 373 deletions

View File

@@ -3,7 +3,7 @@
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
function test_01_String_startsWith(t) {
function test_String_startsWith(t) {
t.plan(3);
var str = "chickenHead";
@@ -19,7 +19,7 @@
"'chickenHead' doesnt start with 'beet'");
}
function test_02_String_contains(t) {
function test_String_contains(t) {
t.plan(4);
var str = "chickenHead";
@@ -34,7 +34,7 @@
"'chickenHead' doesnt start with 'beet'");
}
function test_03_String_trim(t) {
function test_String_trim(t) {
t.plan(5);
var str = "chickenHead";
@@ -57,7 +57,7 @@
t.eq(OpenLayers.String.trim(str), "", "whitespace string is trimmed correctly");
}
function test_05_String_camelize(t) {
function test_String_camelize(t) {
t.plan(7);
var str = "chickenhead";
@@ -143,7 +143,7 @@
}
function test_06_Number_limitSigDigs(t) {
function test_Number_limitSigDigs(t) {
t.plan(9);
var num = 123456789;
@@ -181,7 +181,7 @@
t.eq(format(num, 3), "12.345,679", "changing thousands/decimal separator globally works");
}
function test_07_Function_bind(t) {
function test_Function_bind(t) {
t.plan(12);
g_obj = {};
@@ -206,7 +206,7 @@
newFoo(g_Arg3, g_Arg4);
}
function test_08_Function_bindAsEventListener(t) {
function test_Function_bindAsEventListener(t) {
t.plan(4);
g_obj = {};

View File

@@ -3,7 +3,7 @@
<script src="../../lib/OpenLayers.js"></script>
<script type="text/javascript">
var bounds;
function test_01_Bounds_constructor (t) {
function test_Bounds_constructor (t) {
t.plan( 17 );
bounds = new OpenLayers.Bounds();
@@ -38,7 +38,7 @@
t.ok( boundsCenter.equals(center), "bounds.getCenterLonLat() has correct value" );
}
function test_01a_Bounds_constructorFromStrings(t) {
function test_Bounds_constructorFromStrings(t) {
t.plan( 6 );
bounds = new OpenLayers.Bounds("0","2","10","4");
t.ok( bounds instanceof OpenLayers.Bounds, "new OpenLayers.Bounds returns Bounds object" );
@@ -50,7 +50,7 @@
}
function test_02_Bounds_toBBOX(t) {
function test_Bounds_toBBOX(t) {
t.plan( 5 );
bounds = new OpenLayers.Bounds(1,2,3,4);
t.eq( bounds.toBBOX(), "1,2,3,4", "toBBOX() returns correct value." );
@@ -65,7 +65,7 @@
bounds = new OpenLayers.Bounds(1,2.5555555,3,4);
}
function test_03_Bounds_toString(t) {
function test_Bounds_toString(t) {
t.plan( 1 );
bounds = new OpenLayers.Bounds(1,2,3,4);
t.eq( bounds.toString(), "left-bottom=(1,2) right-top=(3,4)", "toString() returns correct value." );
@@ -101,7 +101,7 @@
"bounds bottom preserved");
}
function test_04_Bounds_contains(t) {
function test_Bounds_contains(t) {
t.plan( 6 );
bounds = new OpenLayers.Bounds(10,10,40,40);
t.eq( bounds.contains(20,20), true, "bounds(10,10,40,40) correctly contains LonLat(20,20)" );
@@ -117,7 +117,7 @@
}
function test_05_Bounds_fromString(t) {
function test_Bounds_fromString(t) {
t.plan( 10 );
bounds = OpenLayers.Bounds.fromString("1,2,3,4");
t.ok( bounds instanceof OpenLayers.Bounds, "new OpenLayers.Bounds returns Bounds object" );
@@ -135,14 +135,14 @@
}
function test_06_Bounds_getSize(t) {
function test_Bounds_getSize(t) {
t.plan( 1 );
var bounds = new OpenLayers.Bounds(0,10,100,120);
t.ok( bounds.getSize().equals(new OpenLayers.Size(100, 110)), "getCenterPixel() works correctly");
}
function test_07_Bounds_clone(t) {
function test_Bounds_clone(t) {
t.plan( 6 );
var oldBounds = new OpenLayers.Bounds(1,2,3,4);
var bounds = oldBounds.clone();
@@ -156,7 +156,7 @@
t.eq( bounds.left, 1, "changing olBounds.left does not change bounds.left" );
}
function test_08a_Bounds_intersectsBounds(t) {
function test_Bounds_intersectsBounds(t) {
t.plan( 17 );
var aBounds = new OpenLayers.Bounds(-180, -90, 180, 90);
@@ -196,7 +196,7 @@
}
function test_08b_Bounds_containsBounds(t) {
function test_Bounds_containsBounds(t) {
t.plan( 35 );
containerBounds = new OpenLayers.Bounds(10,10,40,40);
@@ -251,7 +251,7 @@
t.eq( containerBounds.containsBounds(bounds, true, false) , true, "(" + containerBounds.toBBOX() + ") correctly contains (" + bounds.toBBOX() + ") when partial is true, inclusive is false" );
}
function test_09_Bounds_determineQuadrant(t) {
function test_Bounds_determineQuadrant(t) {
t.plan( 4 );
var bounds = new OpenLayers.Bounds(0,0,100,100);
@@ -267,7 +267,7 @@
t.eq( bounds.determineQuadrant(br), "br", "bounds.determineQuadrant correctly identifies a coordinate in the bottom right quadrant");
}
function test_10_Bounds_oppositeQuadrant(t) {
function test_Bounds_oppositeQuadrant(t) {
t.plan( 4 );
@@ -277,7 +277,7 @@
t.eq( OpenLayers.Bounds.oppositeQuadrant("br"), "tl", "OpenLayers.Bounds.oppositeQuadrant returns 'tl' for 'br'");
}
function test_11_Bounds_equals(t) {
function test_Bounds_equals(t) {
t.plan( 3 );
var boundsA = new OpenLayers.Bounds(1,2,3,4);
var boundsB = new OpenLayers.Bounds(1,2,3,4);
@@ -288,7 +288,7 @@
t.ok( !boundsA.equals(null), "equals() returns false on comparison to null");
}
function test_12_Bounds_getHeight_getWidth(t) {
function test_Bounds_getHeight_getWidth(t) {
t.plan( 2 );
var bounds = new OpenLayers.Bounds(10,20,100,120);
@@ -297,7 +297,7 @@
}
function test_13_Bounds_getCenters(t) {
function test_Bounds_getCenters(t) {
t.plan( 2 );
var bounds = new OpenLayers.Bounds(0,20,100,120);
@@ -305,7 +305,7 @@
t.ok( bounds.getCenterLonLat().equals(new OpenLayers.LonLat(50, 70)), "getCenterLonLat() works correctly");
}
function test_14_Bounds_fromArray(t) {
function test_Bounds_fromArray(t) {
t.plan( 5 );
var bbox = [1,2,3,4];
@@ -317,7 +317,7 @@
t.eq( bounds.top, 4, "bounds.top is set correctly" );
}
function test_15_Bounds_fromSize(t) {
function test_Bounds_fromSize(t) {
t.plan( 5 );
var height = 15;
@@ -332,7 +332,7 @@
}
function test_16_Bounds_extend(t) {
function test_Bounds_extend(t) {
t.plan( 9 );
var originalBounds = new OpenLayers.Bounds();
@@ -429,7 +429,7 @@
}
function test_16_Bounds_wrapDateLine(t) {
function test_Bounds_wrapDateLine(t) {
t.plan( 13 );
var testBounds, wrappedBounds, desiredBounds;
@@ -530,7 +530,7 @@
t.eq(bounds.toBBOX(), "10,-10,20,10", "bounds for inverse spherical mercator transform are correct");
}
function test_17_Bounds_add(t) {
function test_Bounds_add(t) {
t.plan( 8 );
origBounds = new OpenLayers.Bounds(1,2,3,4);

View File

@@ -167,7 +167,7 @@
}
// Remove this at 3.0
function test_01_Class_create (t) {
function test_Class_create (t) {
t.plan( 3 );
var cls = OpenLayers.Class.create();
cls.prototype = {
@@ -189,7 +189,7 @@
}
// Remove this at 3.0
function test_02_Class_inherit (t) {
function test_Class_inherit (t) {
t.plan( 20 );
var A = OpenLayers.Class.create();
var initA = 0;

View File

@@ -5,7 +5,7 @@
<script type="text/javascript">
function test_01_Element_visible(t) {
function test_Element_visible(t) {
t.plan(3);
var elem = {
@@ -24,7 +24,7 @@
t.ok(!OpenLayers.Element.visible(elem), "element with style.display == none is not visible");
}
function test_02_Element_toggle(t) {
function test_Element_toggle(t) {
t.plan(2);
var elem1 = {
@@ -45,7 +45,7 @@
t.eq(elem2.style.display, "none", "shown element toggled to hidden");
}
function test_03_Element_hide(t) {
function test_Element_hide(t) {
t.plan(2);
var elem1 = {
@@ -66,7 +66,7 @@
t.eq(elem2.style.display, "none", "shown element hidden");
}
function test_04_Element_show(t) {
function test_Element_show(t) {
t.plan(2);
var elem1 = {
@@ -87,7 +87,7 @@
t.eq(elem2.style.display, "", "shown element stays shown");
}
function test_05_Element_remove(t) {
function test_Element_remove(t) {
t.plan(1);
var elem = {
@@ -100,7 +100,7 @@
OpenLayers.Element.remove(elem);
}
function test_06_Element_getHeight(t) {
function test_Element_getHeight(t) {
t.plan(1);
var elem = {
@@ -110,7 +110,7 @@
t.ok(OpenLayers.Element.getHeight(elem) == elem.offsetHeight, "offsetHeight returned");
}
function test_07_Element_getDimensions(t) {
function test_Element_getDimensions(t) {
t.plan(4);
//shown
@@ -136,7 +136,7 @@
}
function test_08_Element_getStyle(t) {
function test_Element_getStyle(t) {
t.plan(4);
//tests for this function are not 100% complete... there is some funky

View File

@@ -5,7 +5,7 @@
var lonlat;
function test_01_LonLat_constructor (t) {
function test_LonLat_constructor (t) {
t.plan( 4 );
lonlat = new OpenLayers.LonLat(6, 5);
t.ok( lonlat instanceof OpenLayers.LonLat, "new OpenLayers.LonLat returns LonLat object" );
@@ -14,7 +14,7 @@
t.eq( lonlat.lat, 5, "lonlat.lat is set correctly");
}
function test_01a_LonLat_constructorFromStrings (t) {
function test_LonLat_constructorFromStrings (t) {
t.plan( 4 );
lonlat = new OpenLayers.LonLat("6", "5");
t.ok( lonlat instanceof OpenLayers.LonLat, "new OpenLayers.LonLat returns LonLat object" );
@@ -23,19 +23,19 @@
t.eq( lonlat.lat, 5, "lonlat.lat is set correctly");
}
function test_02_LonLat_toString(t) {
function test_LonLat_toString(t) {
t.plan( 1 );
lonlat = new OpenLayers.LonLat(5,6);
t.eq( lonlat.toString(), "lon=5,lat=6", "lonlat.toString() returns correctly");
}
function test_02A_LonLat_toShortString(t) {
function test_LonLat_toShortString(t) {
t.plan( 1 );
lonlat = new OpenLayers.LonLat(5,6);
t.eq( lonlat.toShortString(), "5, 6", "lonlat.toShortString() returns correctly");
}
function test_03_LonLat_clone(t) {
function test_LonLat_clone(t) {
t.plan( 3 );
oldLonLat = new OpenLayers.LonLat(5,6);
lonlat = oldLonLat.clone();
@@ -46,7 +46,7 @@
t.eq( lonlat.lon, 5, "changing oldLonLat.lon doesn't change lonlat.lon");
}
function test_04_LonLat_add(t) {
function test_LonLat_add(t) {
t.plan( 8 );
origLL = new OpenLayers.LonLat(10,100);
@@ -73,7 +73,7 @@
t.ok(addpx == null, "returns null on erroneous add operation (null lat)");
}
function test_06_LonLat_equals(t) {
function test_LonLat_equals(t) {
t.plan( 5 );
lonlat = new OpenLayers.LonLat(5,6);
@@ -93,7 +93,7 @@
}
function test_07_LonLat_fromString(t) {
function test_LonLat_fromString(t) {
t.plan( 2 );
lonlat = OpenLayers.LonLat.fromString("6,5");
t.ok( lonlat instanceof OpenLayers.LonLat, "new OpenLayers.LonLat returns LonLat object" );
@@ -116,7 +116,7 @@
t.eq(Math.round(lonlat.lat), -10, "lat for inverse spherical mercator correct")
}
function test_08_LonLat_wrapDateLine(t) {
function test_LonLat_wrapDateLine(t) {
t.plan( 6 );
var goodLL = new OpenLayers.LonLat(0,0);

View File

@@ -4,7 +4,7 @@
<script type="text/javascript">
var pixel;
function test_01_Pixel_constructor (t) {
function test_Pixel_constructor (t) {
t.plan( 4 );
pixel = new OpenLayers.Pixel(5,6);
t.ok( pixel instanceof OpenLayers.Pixel, "new OpenLayers.Pixel returns Pixel object" );
@@ -13,7 +13,7 @@
t.eq( pixel.y, 6, "pixel.y is set correctly");
}
function test_01a_Pixel_constructorFromString (t) {
function test_Pixel_constructorFromString (t) {
t.plan( 4 );
pixel = new OpenLayers.Pixel("5","6");
t.ok( pixel instanceof OpenLayers.Pixel, "new OpenLayers.Pixel returns Pixel object" );
@@ -22,13 +22,13 @@
t.eq( pixel.y, 6, "pixel.y is set correctly");
}
function test_02_Pixel_toString(t) {
function test_Pixel_toString(t) {
t.plan( 1 );
pixel = new OpenLayers.Pixel(5,6);
t.eq( pixel.toString(), "x=5,y=6", "pixel.toString() returns correctly");
}
function test_03_Pixel_clone(t) {
function test_Pixel_clone(t) {
t.plan( 4 );
oldPixel = new OpenLayers.Pixel(5,6);
pixel = oldPixel.clone();
@@ -40,7 +40,7 @@
t.eq( pixel.x, 5, "changing oldPixel.x doesn't change pixel.x");
}
function test_06_Pixel_equals(t) {
function test_Pixel_equals(t) {
t.plan( 5 );
pixel = new OpenLayers.Pixel(5,6);
@@ -60,7 +60,7 @@
}
function test_07_Pixel_add(t) {
function test_Pixel_add(t) {
t.plan( 8 );
var origPX = new OpenLayers.Pixel(5,6);
@@ -88,7 +88,7 @@
t.ok(pixel == null, "returns null on erroneous add operation (null y)");
}
function test_08_Pixel_offset(t) {
function test_Pixel_offset(t) {
t.plan( 4 );
var oldPixel = new OpenLayers.Pixel(5,6);

View File

@@ -4,7 +4,7 @@
<script type="text/javascript">
var Size;
function test_01_Size_constructor (t) {
function test_Size_constructor (t) {
t.plan( 4 );
size = new OpenLayers.Size(5,6);
t.ok( size instanceof OpenLayers.Size, "new OpenLayers.Size returns size object" );
@@ -13,7 +13,7 @@
t.eq( size.h, 6, "size.h is set correctly");
}
function test_01a_Size_constructorFromString (t) {
function test_Size_constructorFromString (t) {
t.plan( 4 );
size = new OpenLayers.Size("5","6");
t.ok( size instanceof OpenLayers.Size, "new OpenLayers.Size returns size object" );
@@ -22,13 +22,13 @@
t.eq( size.h, 6, "size.h is set correctly");
}
function test_02_Size_toString(t) {
function test_Size_toString(t) {
t.plan( 1 );
size = new OpenLayers.Size(5,6);
t.eq( size.toString(), "w=5,h=6", "size.toString() returns correctly");
}
function test_03_Size_clone(t) {
function test_Size_clone(t) {
t.plan( 3 );
oldSize = new OpenLayers.Size(5,6);
@@ -40,7 +40,7 @@
t.eq( size.w, 5, "changing oldSize.w doesn't change size.w");
}
function test_04_Size_equals(t) {
function test_Size_equals(t) {
t.plan( 5 );
size = new OpenLayers.Size(5,6);

View File

@@ -3,7 +3,7 @@
<script src="../../lib/OpenLayers.js"></script>
<script type="text/javascript">
var map;
function test_01_Control_Attribution_constructor (t) {
function test_Control_Attribution_constructor (t) {
t.plan( 2 );
control = new OpenLayers.Control.Attribution();

View File

@@ -3,7 +3,7 @@
<script src="../../lib/OpenLayers.js"></script>
<script type="text/javascript">
var map;
function test_01_Control_KeyboardDefaults_constructor (t) {
function test_Control_KeyboardDefaults_constructor (t) {
t.plan( 2 );
control = new OpenLayers.Control.KeyboardDefaults();
@@ -12,7 +12,7 @@
t.eq( control.displayClass, "olControlKeyboardDefaults", "displayClass is correct" );
}
function test_02_Control_KeyboardDefaults_addControl (t) {
function test_Control_KeyboardDefaults_addControl (t) {
t.plan( 4 );
map = new OpenLayers.Map('map');
@@ -26,7 +26,7 @@
t.ok( map.controls[3] === control, "map.controls contains control" );
}
function test_03_Control_KeyboardDefaults_KeyDownEvent (t) {
function test_Control_KeyboardDefaults_KeyDownEvent (t) {
t.plan( 10 );
var evt = {which: 1};

View File

@@ -4,7 +4,7 @@
<script type="text/javascript">
var map;
function test_01_Control_LayerSwitcher_constructor (t) {
function test_Control_LayerSwitcher_constructor (t) {
t.plan( 2 );
control = new OpenLayers.Control.LayerSwitcher();
@@ -12,7 +12,7 @@
t.eq( control.displayClass, "olControlLayerSwitcher", "displayClass is correct" );
}
function test_02_Control_LayerSwitcher_draw (t) {
function test_Control_LayerSwitcher_draw (t) {
t.plan( 2 );
map = new OpenLayers.Map('map');
@@ -35,7 +35,7 @@
t.eq(control.div.style.width, "0px", "Div is minimized when added.");
}
function test_03_Control_LayerSwitcher_loadContents(t) {
function test_Control_LayerSwitcher_loadContents(t) {
t.plan( 5 );
@@ -63,7 +63,7 @@
}
function test_04_Control_LayerSwitcher_redraw (t) {
function test_Control_LayerSwitcher_redraw (t) {
t.plan( (OpenLayers.Util.getBrowserName() == "opera" ? 9 : 19 ) );
@@ -135,7 +135,7 @@
}
}
function test_05_Control_LayerSwitcher_ascendingw (t) {
function test_Control_LayerSwitcher_ascendingw (t) {
t.plan( 4 );

View File

@@ -3,14 +3,14 @@
<script src="../../lib/OpenLayers.js"></script>
<script type="text/javascript">
var map, control;
function test_01_Control_MousePosition_constructor (t) {
function test_Control_MousePosition_constructor (t) {
t.plan( 2 );
control = new OpenLayers.Control.MousePosition();
t.ok( control instanceof OpenLayers.Control.MousePosition, "new OpenLayers.Control returns object" );
t.eq( control.displayClass, "olControlMousePosition", "displayClass is correct" );
}
function test_02_Control_MousePosition_redraw_noLayer_displayProjection(t) {
function test_Control_MousePosition_redraw_noLayer_displayProjection(t) {
t.plan(2);
control = new OpenLayers.Control.MousePosition({'displayProjection': new OpenLayers.Projection("WGS84")});
map = new OpenLayers.Map('map');
@@ -53,7 +53,7 @@
map.destroy();
}
function test_02_Control_MousePosition_redraw_noLayer_displayProjection(t) {
function test_Control_MousePosition_redraw_noLayer_displayProjection(t) {
t.plan(3);
var control = new OpenLayers.Control.MousePosition();
var map = new OpenLayers.Map('map');

View File

@@ -3,13 +3,13 @@
<script src="../../lib/OpenLayers.js"></script>
<script type="text/javascript">
var map;
function test_01_Control_MouseToolbar_constructor (t) {
function test_Control_MouseToolbar_constructor (t) {
t.plan( 1 );
control = new OpenLayers.Control.MouseToolbar();
t.ok( control instanceof OpenLayers.Control.MouseToolbar, "new OpenLayers.Control.MouseToolbar returns object" );
}
function test_02_Control_MouseToolbar_addControl (t) {
function test_Control_MouseToolbar_addControl (t) {
t.plan( 8 );
map = new OpenLayers.Map('map');
control = new OpenLayers.Control.MouseToolbar();
@@ -24,7 +24,7 @@
t.eq( control.div.style.top, "300px", "Control div top located correctly by default");
}
function test_03_Control_MouseToolbar_control_events (t) {
function test_Control_MouseToolbar_control_events (t) {
t.plan( 1 );
if ((navigator.userAgent.indexOf("compatible") == -1)) {
var evt = {which: 1}; // control expects left-click

View File

@@ -3,7 +3,7 @@
<script src="../../lib/OpenLayers.js"></script>
<script type="text/javascript">
var map;
function test_01_Control_NavToolbar_constructor (t) {
function test_Control_NavToolbar_constructor (t) {
t.plan( 4 );
control = new OpenLayers.Control.NavToolbar();
t.ok( control instanceof OpenLayers.Control.NavToolbar, "new OpenLayers.Control.NavToolbar returns object" );
@@ -11,7 +11,7 @@
t.ok( control.controls[0] instanceof OpenLayers.Control.Navigation, "NavToolbar contains Control.Navigation object" );
t.ok( control.controls[1] instanceof OpenLayers.Control.ZoomBox, "NavToolbar contains Control.ZoomBox object" );
}
function test_02_Control_NavToolbar_addControl (t) {
function test_Control_NavToolbar_addControl (t) {
t.plan( 6 );
map = new OpenLayers.Map('map');
control = new OpenLayers.Control.NavToolbar();

View File

@@ -3,7 +3,7 @@
<script src="../../lib/OpenLayers.js"></script>
<script type="text/javascript">
var map;
function test_01_Control_PanZoom_constructor (t) {
function test_Control_PanZoom_constructor (t) {
t.plan( 4 );
control = new OpenLayers.Control.PanZoom();
@@ -13,7 +13,7 @@
t.eq( control.position.x, 100, "PanZoom X Set correctly.");
t.eq( control.position.y, 100, "PanZoom y Set correctly.");
}
function test_02_Control_PanZoom_addControl (t) {
function test_Control_PanZoom_addControl (t) {
t.plan( 8 );
map = new OpenLayers.Map('map');
control = new OpenLayers.Control.PanZoom();
@@ -31,7 +31,7 @@
t.eq( control2.div.style.top, "100px", "2nd control div is located correctly");
}
function test_03_Control_PanZoom_control_events (t) {
function test_Control_PanZoom_control_events (t) {
if ( !window.document.createEvent || OpenLayers.Util.getBrowserName() == "opera") {
//ie can't simulate mouseclicks

View File

@@ -3,7 +3,7 @@
<script src="../../lib/OpenLayers.js"></script>
<script type="text/javascript">
var map;
function test_01_Control_PanZoomBar_constructor (t) {
function test_Control_PanZoomBar_constructor (t) {
t.plan( 4 );
control = new OpenLayers.Control.PanZoomBar({position: new OpenLayers.Pixel(100,100)});
@@ -12,7 +12,7 @@
t.eq( control.position.x, 100, "PanZoom X Set correctly.");
t.eq( control.position.y, 100, "PanZoom y Set correctly.");
}
function test_02_Control_PanZoomBar_addControl (t) {
function test_Control_PanZoomBar_addControl (t) {
t.plan( 8 );
map = new OpenLayers.Map('map', {controls:[]});
var layer = new OpenLayers.Layer.WMS("Test Layer",

View File

@@ -9,7 +9,7 @@
t.ok( control instanceof OpenLayers.Control.Panel, "new OpenLayers.Control returns object" );
t.eq( control.displayClass, "olControlPanel", "displayClass is correct" );
}
function test_01_Control_Panel_constructor (t) {
function test_Control_Panel_constructor (t) {
t.plan(5);
var map = new OpenLayers.Map('map');
var panel = new OpenLayers.Control.Panel();
@@ -46,7 +46,7 @@
t.ok(!toolControl.active && anotherToolControl.active && toggleControl.active,
"activated the other tool control, the first one is inactive and the toggle control still active.");
}
function test_02_Control_Panel_titles (t) {
function test_Control_Panel_titles (t) {
t.plan(2);
var panel = new OpenLayers.Control.Panel();
var toolControl = new OpenLayers.Control.ZoomBox({

View File

@@ -3,7 +3,7 @@
<script src="../../lib/OpenLayers.js"></script>
<script type="text/javascript">
var map;
function test_01_Control_Permalink_constructor (t) {
function test_Control_Permalink_constructor (t) {
t.plan( 2 );
control = new OpenLayers.Control.Permalink();
@@ -19,13 +19,13 @@
map.events.triggerEvent("changelayer", {});
t.ok(true, "permalink didn't bomb out.");
}
function test_02_Control_Permalink_initwithelem (t) {
function test_Control_Permalink_initwithelem (t) {
t.plan( 1 );
control = new OpenLayers.Control.Permalink(OpenLayers.Util.getElement('permalink'));
t.ok(true, "If the above line doesn't throw an error, we're safe.");
}
function test_02_Control_Permalink_updateLinks (t) {
function test_Control_Permalink_updateLinks (t) {
t.plan( 3 );
control = new OpenLayers.Control.Permalink('permalink');
@@ -45,7 +45,7 @@
t.ok(OpenLayers.Util.isEquivalentUrl(OpenLayers.Util.getElement('permalink').href, location+"?zoom=2&lat=0&lon=1.75781&layers=BF"), 'setVisibility sets permalink');
}
function test_03_Control_Permalink_updateLinksBase (t) {
function test_Control_Permalink_updateLinksBase (t) {
t.plan( 2 );
control = new OpenLayers.Control.Permalink('permalink', "./edit.html" );
@@ -59,7 +59,7 @@
OpenLayers.Util.getElement('edit_permalink').href = './edit.html?zoom=2&lat=0&lon=1.75781&layers=B';
t.eq(OpenLayers.Util.getElement('permalink').href, OpenLayers.Util.getElement('edit_permalink').href, "Panning sets permalink with base");
}
function test_04_Control_Permalink_noElement (t) {
function test_Control_Permalink_noElement (t) {
t.plan( 2 );
control = new OpenLayers.Control.Permalink( );
t.ok( control instanceof OpenLayers.Control.Permalink, "new OpenLayers.Control returns object" );
@@ -67,7 +67,7 @@
map.addControl(control);
t.eq(map.controls[4].div.firstChild.nodeName, "A", "Permalink control creates div with 'a' inside." );
}
function test_05_Control_Permalink_base_with_query (t) {
function test_Control_Permalink_base_with_query (t) {
t.plan( 3 );
control = new OpenLayers.Control.Permalink('permalink', "./edit.html?foo=bar" );
@@ -94,7 +94,7 @@
}
function test_06_Control_Permalink_nonRepeating (t) {
function test_Control_Permalink_nonRepeating (t) {
t.plan( 2 );
control = new OpenLayers.Control.Permalink('permalink', "./edit.html?zoom=3" );

View File

@@ -3,20 +3,20 @@
<script src="../../lib/OpenLayers.js"></script>
<script type="text/javascript">
var map;
function test_01_Control_Scale_constructor (t) {
function test_Control_Scale_constructor (t) {
t.plan( 2 );
control = new OpenLayers.Control.Scale();
t.ok( control instanceof OpenLayers.Control.Scale, "new OpenLayers.Control returns object" );
t.eq( control.displayClass, "olControlScale", "displayClass is correct" );
}
function test_02_Control_Scale_initwithelem (t) {
function test_Control_Scale_initwithelem (t) {
t.plan( 1 );
control = new OpenLayers.Control.Scale(OpenLayers.Util.getElement('scale'));
t.ok(true, "If this happens, then we passed. (FF throws an error above otherwise)");
}
function test_02_Control_Scale_updateScale (t) {
function test_Control_Scale_updateScale (t) {
t.plan( 4 );
control = new OpenLayers.Control.Scale('scale');
@@ -33,7 +33,7 @@
map.zoomTo(0);
t.eq(OpenLayers.Util.getElement('scale').innerHTML, "Scale = 1 : 110", "Scale of 100 isn't rounded" );
}
function test_03_Control_Scale_internalScale (t) {
function test_Control_Scale_internalScale (t) {
t.plan(2);
control = new OpenLayers.Control.Scale();
t.ok( control instanceof OpenLayers.Control.Scale, "new OpenLayers.Control returns object" );

View File

@@ -6,7 +6,7 @@
var map;
var a;
function test_01_Events_constructor (t) {
function test_Events_constructor (t) {
var mapDiv = OpenLayers.Util.getElement('map');
var obj = {result: 0};
var eventTypes = ["doThingA", "doThingB", "doThingC"];
@@ -40,7 +40,7 @@
"init of Events with null object/element/eventTypes still creates listeners array" );
}
function test_02_Events_register_unregister(t) {
function test_Events_register_unregister(t) {
t.plan( 18 );
@@ -123,7 +123,7 @@
}
function test_03_Events_remove(t) {
function test_Events_remove(t) {
t.plan( 2 );
@@ -150,7 +150,7 @@
}
function test_04_Events_triggerEvent(t) {
function test_Events_triggerEvent(t) {
t.plan(13);
@@ -251,7 +251,7 @@
}
function test_05_Events_destroy (t) {
function test_Events_destroy (t) {
t.plan(2);
var div = OpenLayers.Util.getElement('test');
@@ -269,7 +269,7 @@
"destruction removes the event observer from hash");
}
function test_06_Event(t) {
function test_Event(t) {
t.plan(24);
var div = OpenLayers.Util.getElement('test');
@@ -353,7 +353,7 @@
}
function test_06_Events_addEventType(t) {
function test_Events_addEventType(t) {
t.plan( 6 );

View File

@@ -6,7 +6,7 @@
var map;
var feature, layer;
function test_01_Feature_constructor (t) {
function test_Feature_constructor (t) {
t.plan( 7 );
var layer = {};
@@ -29,7 +29,7 @@
t.ok( feature.popupClass == OpenLayers.Popup.AnchoredBubble, "default popupClass is AnchoredBubble");
}
function test_02_Feature_createPopup (t) {
function test_Feature_createPopup (t) {
t.plan(1);
var layer = {};
var lonlat = new OpenLayers.LonLat(2,1);
@@ -46,7 +46,7 @@
var prop = (OpenLayers.Util.getBrowserName() == 'safari') ? 'overflowX' : 'overflow';
t.eq(popup.contentDiv.style[prop], "auto", 'overflow on popup is correct');
}
function test_02_Feature_createMarker (t) {
function test_Feature_createMarker (t) {
t.plan(1);
t.ok(true);
/*
@@ -96,7 +96,7 @@
*/
}
function test_03_Feature_onScreen(t) {
function test_Feature_onScreen(t) {
t.plan( 2 );
var map = new OpenLayers.Map("map");
@@ -122,7 +122,7 @@
t.ok( !feature2.onScreen(), "feature knows it's offscreen" );
}
function test_04_Feature_createPopup(t) {
function test_Feature_createPopup(t) {
t.plan(11);
//no lonlat
@@ -176,7 +176,7 @@
t.ok( f.popup.feature == f, "popup's 'feature' property correctly set");
}
function test_04_Feature_destroyPopup(t) {
function test_Feature_destroyPopup(t) {
t.plan(2);
var f = {

View File

@@ -3,7 +3,7 @@
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
function test_01_Format_constructor(t) {
function test_Format_constructor(t) {
t.plan(4);
var options = {'foo': 'bar'};

View File

@@ -5,7 +5,7 @@
<script type="text/javascript">
var map;
function test_01_Geometry_constructor (t) {
function test_Geometry_constructor (t) {
t.plan( 2 );
var g = new OpenLayers.Geometry();
@@ -26,7 +26,7 @@
"id correctly set");
}
function test_02_Geometry_setBounds(t) {
function test_Geometry_setBounds(t) {
t.plan( 2 );
var g = new OpenLayers.Geometry();
@@ -44,7 +44,7 @@
t.ok(g.bounds == g_clone, "setbounds with valid object sets bounds, calls clone");
}
function test_03_Geometry_extendBounds(t) {
function test_Geometry_extendBounds(t) {
t.plan(9);
OpenLayers.Bounds.prototype._extend =
@@ -103,7 +103,7 @@
}
function test_04_Geometry_getBounds(t) {
function test_Geometry_getBounds(t) {
t.plan(1);
var g = new OpenLayers.Geometry();
@@ -114,7 +114,7 @@
t.ok(g.getBounds().equals(testBounds), "getBounds works");
}
function test_05_Geometry_atPoint(t) {
function test_Geometry_atPoint(t) {
t.plan(6);
var g = new OpenLayers.Geometry();
@@ -173,7 +173,7 @@
}
function test_06_Geometry_getLength(t) {
function test_Geometry_getLength(t) {
t.plan(1);
var g = new OpenLayers.Geometry();
@@ -181,7 +181,7 @@
t.eq(g.getLength(), 0, "getLength is 0");
}
function test_07_Geometry_getArea(t) {
function test_Geometry_getArea(t) {
t.plan(1);
var g = new OpenLayers.Geometry();
@@ -189,7 +189,7 @@
t.eq(g.getArea(), 0, "getArea is 0");
}
function test_08_Geometry_clearBounds(t) {
function test_Geometry_clearBounds(t) {
t.plan(2);
var g = new OpenLayers.Geometry();
@@ -203,7 +203,7 @@
t.ok(g.parent.bounds == null, "parent geometry bounds is correctly cleared");
}
function test_99_Geometry_destroy(t) {
function test_Geometry_destroy(t) {
t.plan( 2 );
var g = new OpenLayers.Geometry();

View File

@@ -4,7 +4,7 @@
<script type="text/javascript">
var coll;
function test_01_Collection_constructor (t) {
function test_Collection_constructor (t) {
t.plan( 4 );
//null param
@@ -28,7 +28,7 @@
OpenLayers.Geometry.Collection.prototype._addComponents;
}
function test_02_Collection_addComponents (t) {
function test_Collection_addComponents (t) {
t.plan( 10 );
coll = new OpenLayers.Geometry.Collection();
@@ -76,7 +76,7 @@
t.eq( bounds.top, 10, "top bound is 10" );
}
function test_03_Collection_clone (t) {
function test_Collection_clone (t) {
t.plan( 3 );
coll = new OpenLayers.Geometry.Collection();
coll.addComponents(new OpenLayers.Geometry.Point(0,0));
@@ -88,7 +88,7 @@
"coll2.components.length is set correctly");
}
function test_04_Collection_removeComponents (t) {
function test_Collection_removeComponents (t) {
t.plan( 5 );
coll = new OpenLayers.Geometry.Collection();
point = new OpenLayers.Geometry.Point(0,0);
@@ -113,7 +113,7 @@
}
function test_06_Collection_calculateBounds(t) {
function test_Collection_calculateBounds(t) {
t.plan( 9 );
var coll = new OpenLayers.Geometry.Collection();
@@ -149,7 +149,7 @@
t.ok(!geom.equals(), "collection.equals() returns false for undefined");
}
function test_07_Collection_addComponent(t) {
function test_Collection_addComponent(t) {
t.plan(10);
var coll = new OpenLayers.Geometry.Collection();
@@ -196,7 +196,7 @@
}
function test_08_collection_getLength(t) {
function test_collection_getLength(t) {
t.plan(2);
//null
@@ -211,7 +211,7 @@
t.eq( coll.getLength(), 65, "coll with valid components correctly sums getlength");
}
function test_09_collection_getArea(t) {
function test_collection_getArea(t) {
t.plan(2);
//null
@@ -226,7 +226,7 @@
t.eq( coll.getArea(), 65, "coll with valid components correctly sums getArea");
}
function test_99_Collection_destroy(t) {
function test_Collection_destroy(t) {
t.plan( 1 );
coll = new OpenLayers.Geometry.Collection();
coll.components = {};

View File

@@ -6,7 +6,7 @@
var components = [new OpenLayers.Geometry.Point(10,10),
new OpenLayers.Geometry.Point(0,0)];
function test_01_Curve_constructor (t) {
function test_Curve_constructor (t) {
t.plan( 3 );
curve = new OpenLayers.Geometry.Curve();
t.ok( curve instanceof OpenLayers.Geometry.Curve, "new OpenLayers.Geometry.Curve returns curve object" );
@@ -14,14 +14,14 @@
t.eq( curve.components, [], "curve.components is set correctly");
}
function test_01a_Curve_constructor (t) {
function test_Curve_constructor (t) {
t.plan( 2 );
curve = new OpenLayers.Geometry.Curve(components);
t.ok( curve instanceof OpenLayers.Geometry.Curve, "new OpenLayers.Geometry.Curve returns curve object" );
t.eq( curve.components.length, 2, "curve.components.length is set correctly");
}
function test_02_Curve_clone (t) {
function test_Curve_clone (t) {
t.plan( 2 );
curve = new OpenLayers.Geometry.Curve(components);
curve2 = curve.clone();
@@ -29,7 +29,7 @@
t.eq( curve2.components.length, 2, "curve2.components.length is set correctly");
}
function test_03_Curve_calculateBounds(t) {
function test_Curve_calculateBounds(t) {
t.plan( 17 );
@@ -83,7 +83,7 @@
}
function test_04_Curve_addComponent (t) {
function test_Curve_addComponent (t) {
t.plan( 8 );
curve = new OpenLayers.Geometry.Curve(components);
curve.addComponent(new OpenLayers.Geometry.Point(20,30));
@@ -100,7 +100,7 @@
t.eq( curve.components[1].y, -30, "new point.lat is -30 (index worked)" );
}
function test_05_Curve_removeComponent (t) {
function test_Curve_removeComponent (t) {
t.plan( 4 );
curve = new OpenLayers.Geometry.Curve(components);
curve.removeComponent(curve.components[1]);
@@ -111,7 +111,7 @@
t.eq( bounds.bottom, 10, "bottom bound is 10 after removeComponent" );
}
function test_06_Curve_getLength (t) {
function test_Curve_getLength (t) {
t.plan( 4 );
//no components
@@ -138,7 +138,7 @@
t.eq(curve.getLength(), 50, "curve.getLength returns a reasonably accurate length" );
}
function test_07_Curve_destroy(t) {
function test_Curve_destroy(t) {
t.plan(1);
var curve = new OpenLayers.Geometry.Curve();

View File

@@ -6,7 +6,7 @@
var components = [new OpenLayers.Geometry.Point(10,15),
new OpenLayers.Geometry.Point(0,0)];
function test_01_LineString_constructor (t) {
function test_LineString_constructor (t) {
t.plan( 3 );
line = new OpenLayers.Geometry.LineString();
t.ok( line instanceof OpenLayers.Geometry.LineString, "new OpenLayers.Geometry.LineString returns line object" );
@@ -14,7 +14,7 @@
t.eq( line.components, [], "line.components is set correctly");
}
function test_01a_LineString_constructor (t) {
function test_LineString_constructor (t) {
t.plan( 3 );
line = new OpenLayers.Geometry.LineString(components);
t.ok( line instanceof OpenLayers.Geometry.LineString, "new OpenLayers.Geometry.LineString returns line object" );
@@ -24,7 +24,7 @@
t.eq( line.components.length, 2, "line.components.length is set correctly");
}
function test_02_LineString_toString(t) {
function test_LineString_toString(t) {
t.plan(1);
line = new OpenLayers.Geometry.LineString(components);
@@ -33,7 +33,7 @@
"toString() returns WKT");
}
function test_03_LineString_removeComponent(t) {
function test_LineString_removeComponent(t) {
t.plan(2);
OpenLayers.Geometry.Collection.prototype._removeComponent =
@@ -55,7 +55,7 @@
OpenLayers.Geometry.Collection.prototype._removeComponent;
}
function test_04_LineString_move(t) {
function test_LineString_move(t) {
t.plan(4);
var components = [new OpenLayers.Geometry.Point(10,15),

View File

@@ -6,7 +6,7 @@
var components = [new OpenLayers.Geometry.Point(10,10),
new OpenLayers.Geometry.Point(0,0)];
function test_01_LinearRing_constructor (t) {
function test_LinearRing_constructor (t) {
t.plan( 6 );
//null
@@ -22,7 +22,7 @@
t.eq( ring.components.length, 3, "ring.components.length is set correctly");
}
function test_02_LinearRing_addComponent(t) {
function test_LinearRing_addComponent(t) {
t.plan(13);
var ring = new OpenLayers.Geometry.LinearRing();
@@ -57,7 +57,7 @@
}
function test_03_LinearRing_removeComponent(t) {
function test_LinearRing_removeComponent(t) {
t.plan(11);
var components = [new OpenLayers.Geometry.Point(0,0),
@@ -89,7 +89,7 @@
}
function test_04_LinearRing_getArea(t) {
function test_LinearRing_getArea(t) {
t.plan(1);
var components = [new OpenLayers.Geometry.Point(0,0),
new OpenLayers.Geometry.Point(0,10),

View File

@@ -4,7 +4,7 @@
<script type="text/javascript">
var line;
function test_01_MultiLineString_constructor (t) {
function test_MultiLineString_constructor (t) {
t.plan( 3 );
mline = new OpenLayers.Geometry.MultiLineString();
t.ok( mline instanceof OpenLayers.Geometry.MultiLineString, "new OpenLayers.Geometry.MultiLineString returns mline object" );
@@ -12,7 +12,7 @@
t.eq( mline.components, [], "line.components is set correctly");
}
function test_01a_MultiLineString_constructor (t) {
function test_MultiLineString_constructor (t) {
t.plan( 3 );
line = new OpenLayers.Geometry.LineString();
mline = new OpenLayers.Geometry.MultiLineString(line);

View File

@@ -5,14 +5,14 @@
var point = new OpenLayers.Geometry.Point(10, 15);
function test_01_MultiPoint_constructor (t) {
function test_MultiPoint_constructor (t) {
t.plan( 2 );
var multipoint = new OpenLayers.Geometry.MultiPoint();
t.ok( multipoint instanceof OpenLayers.Geometry.MultiPoint, "new OpenLayers.Geometry.MultiPoint returns multipoint object" );
t.eq( multipoint.CLASS_NAME, "OpenLayers.Geometry.MultiPoint", "multipoint.CLASS_NAME is set correctly");
}
function test_01a_MultiPoint_constructor (t) {
function test_MultiPoint_constructor (t) {
t.plan( 3 );
var multipoint = new OpenLayers.Geometry.MultiPoint([point]);
t.ok( multipoint instanceof OpenLayers.Geometry.MultiPoint, "new OpenLayers.Geometry.MultiPoint returns multipoint object" );
@@ -20,7 +20,7 @@
t.eq( multipoint.components.length, 1, "multipolygon.components.length is set correctly");
}
function test_02_MultiPoint_move(t) {
function test_MultiPoint_move(t) {
t.plan(2);
var multipoint = new OpenLayers.Geometry.MultiPoint([point]);

View File

@@ -11,14 +11,14 @@
var polygon = new OpenLayers.Geometry.Polygon([linearRing]);
var polygon2 = new OpenLayers.Geometry.Polygon([linearRing2]);
function test_01_MultiPolygon_constructor (t) {
function test_MultiPolygon_constructor (t) {
t.plan( 2 );
multipolygon = new OpenLayers.Geometry.MultiPolygon();
t.ok( multipolygon instanceof OpenLayers.Geometry.MultiPolygon, "new OpenLayers.Geometry.MultiPolygon returns multipolygon object" );
t.eq( multipolygon.CLASS_NAME, "OpenLayers.Geometry.MultiPolygon", "multipolygon.CLASS_NAME is set correctly");
}
function test_01a_MultiPolygon_constructor (t) {
function test_MultiPolygon_constructor (t) {
t.plan( 3 );
multipolygon = new OpenLayers.Geometry.MultiPolygon([polygon, polygon2]);
t.ok( multipolygon instanceof OpenLayers.Geometry.MultiPolygon, "new OpenLayers.Geometry.MultiPolygon returns multipolygon object" );

View File

@@ -4,7 +4,7 @@
<script type="text/javascript">
var point;
function test_01_Point_constructor (t) {
function test_Point_constructor (t) {
t.plan( 8 );
//empty
@@ -24,7 +24,7 @@
t.eq( point.lat, null, "point.lat is not set");
}
function test_03_Point_calculateBounds (t) {
function test_Point_calculateBounds (t) {
t.plan(4);
var x = 10;
@@ -37,7 +37,7 @@
t.eq( point.bounds.bottom, y, "bounds.bottom is 20" );
}
function test_04_Point_distanceTo(t) {
function test_Point_distanceTo(t) {
t.plan(2);
var x1 = 10;
@@ -53,7 +53,7 @@
t.eq( dist, Math.sqrt((x2-x1)*(x2-x1) + (y2-y1)*(y2-y1)), "distance calculation correct");
}
function test_05_Point_toString(t) {
function test_Point_toString(t) {
t.plan(1);
var x = 10;
@@ -64,7 +64,7 @@
}
function test_06_Point_move(t) {
function test_Point_move(t) {
t.plan(3);
var x = 10;

View File

@@ -8,7 +8,7 @@
var linearRing = new OpenLayers.Geometry.LinearRing(components);
var linearRing2 = new OpenLayers.Geometry.LinearRing(components2);
function test_01_Polygon_constructor (t) {
function test_Polygon_constructor (t) {
t.plan( 3 );
polygon = new OpenLayers.Geometry.Polygon();
t.ok( polygon instanceof OpenLayers.Geometry.Polygon, "new OpenLayers.Geometry.Polygon returns polygon object" );
@@ -16,7 +16,7 @@
t.eq( polygon.components.length, 0, "polygon.components is set correctly");
}
function test_01a_Polygon_constructor (t) {
function test_Polygon_constructor (t) {
t.plan( 3 );
polygon = new OpenLayers.Geometry.Polygon([linearRing]);
t.ok( polygon instanceof OpenLayers.Geometry.Polygon, "new OpenLayers.Geometry.Polygon returns polygon object" );
@@ -24,7 +24,7 @@
t.eq( polygon.components.length, 1, "polygon.components.length is set correctly");
}
function test_01b_Polygon_constructor (t) {
function test_Polygon_constructor (t) {
t.plan( 3 );
polygon = new OpenLayers.Geometry.Polygon([linearRing, linearRing2]);
t.ok( polygon instanceof OpenLayers.Geometry.Polygon, "new OpenLayers.Geometry.Polygon returns polygon object" );
@@ -32,7 +32,7 @@
t.eq( polygon.components.length, 2, "polygon.components.length is set correctly");
}
function test_02_Polygon_getArea(t) {
function test_Polygon_getArea(t) {
t.plan( 5 );
//no components
@@ -85,7 +85,7 @@
}
function test_03_Polygon_move(t) {
function test_Polygon_move(t) {
t.plan(4);
polygon = new OpenLayers.Geometry.Polygon([linearRing, linearRing2]);

View File

@@ -3,7 +3,7 @@
<script src="../../lib/OpenLayers.js"></script>
<script type="text/javascript">
function test_01_Rectangle_constructor (t) {
function test_Rectangle_constructor (t) {
t.plan( 8 );
//empty
@@ -25,7 +25,7 @@
t.eq( rect.height, h, "good init correctly sets height property");
}
function test_02_Rectangle_calculateBounds(t) {
function test_Rectangle_calculateBounds(t) {
t.plan(1);
var x = 1;
@@ -40,7 +40,7 @@
t.ok( rect.bounds.equals(testBounds), "calculateBounds works correctly");
}
function test_03_Rectangle_getLength(t) {
function test_Rectangle_getLength(t) {
t.plan(1);
var x = 1;
@@ -54,7 +54,7 @@
t.eq(rect.getLength(), testLength, "getLength() works");
}
function test_04_Rectangle_getArea(t) {
function test_Rectangle_getArea(t) {
t.plan(1);
var x = 1;

View File

@@ -3,7 +3,7 @@
<script src="../../lib/OpenLayers.js"></script>
<script type="text/javascript">
function test_01_Surface_constructor (t) {
function test_Surface_constructor (t) {
t.plan( 2 );
var g = new OpenLayers.Geometry.Surface();

View File

@@ -4,7 +4,7 @@
<script type="text/javascript">
var icon;
function test_01_Icon_constructor (t) {
function test_Icon_constructor (t) {
t.plan( 4 );
var size = new OpenLayers.Size(5,6);
icon = new OpenLayers.Icon("", size);
@@ -13,7 +13,7 @@
t.ok( icon.size.equals(size), "icon.size returns correct value" );
t.eq( icon.url, "", "icon.url returns str object" );
}
function test_02_Icon_clone (t) {
function test_Icon_clone (t) {
t.plan( 4 );
icon = new OpenLayers.Icon("a",new OpenLayers.Size(5,6));
t.ok( icon instanceof OpenLayers.Icon, "new OpenLayers.Icon returns Icon object" );
@@ -24,7 +24,7 @@
t.eq( cloned.url, "b", "cloned.url does change when edited" );
}
function test_03_Marker_setOpacity(t) {
function test_Marker_setOpacity(t) {
t.plan( 2 );
icon = new OpenLayers.Icon("a",new OpenLayers.Size(5,6));

View File

@@ -4,7 +4,7 @@
<script type="text/javascript">
var layer;
function test_01_Layer_constructor (t) {
function test_Layer_constructor (t) {
t.plan( 15 );
var options = { chicken: 151, foo: "bar", projection: "none" };
@@ -35,7 +35,7 @@
t.ok( layer.options instanceof Object, "layer.options correctly initialized as a non-null Object" );
}
function test_02_Layer_clone (t) {
function test_Layer_clone (t) {
t.plan( 8 );
var mapone = new OpenLayers.Map('map');
@@ -68,7 +68,7 @@
maptwo.destroy();
}
function test_03_Layer_setName (t) {
function test_Layer_setName (t) {
t.plan( 1 );
@@ -79,7 +79,7 @@
}
function test_04_Layer_addOptions (t) {
function test_Layer_addOptions (t) {
t.plan( 4 );
@@ -96,7 +96,7 @@
}
function test_04_Layer_StandardOptionsAccessors (t) {
function test_Layer_StandardOptionsAccessors (t) {
t.plan( 4 );
@@ -212,7 +212,7 @@
}
function test_05_Layer_visibility(t) {
function test_Layer_visibility(t) {
t.plan(7);
@@ -249,7 +249,7 @@
}
function test_06_Layer_getZoomForResolution(t) {
function test_Layer_getZoomForResolution(t) {
t.plan(12);
@@ -282,7 +282,7 @@
}
function test_07_Layer_redraw(t) {
function test_Layer_redraw(t) {
t.plan(8)
var name = 'Test Layer';
@@ -341,7 +341,7 @@
t.ok(layer.isBaseLayer, "setIsBaseLayer() change isBaseLayer property.");
}
function test_08_layer_setTileSize(t) {
function test_layer_setTileSize(t) {
t.plan(6);
layer = new OpenLayers.Layer();
@@ -435,7 +435,7 @@
*/
function test_99_Layer_destroy (t) {
function test_Layer_destroy (t) {
t.plan( 5 );
var map = new OpenLayers.Map('map');

View File

@@ -6,7 +6,7 @@
var isOpera = (navigator.userAgent.indexOf("Opera") != -1);
var layer;
function test_01_Layer_EventPane_constructor (t) {
function test_Layer_EventPane_constructor (t) {
t.plan( 5 );
var layer = new OpenLayers.Layer.EventPane('Test Layer');
@@ -22,7 +22,7 @@
}
}
function test_02_Layer_EventPane_clone (t) {
function test_Layer_EventPane_clone (t) {
t.plan( 1 );
t.ok( true, "need to actually write some tests here" );
return;
@@ -52,7 +52,7 @@
}
function test_10_Layer_EventPane_setMap (t) {
function test_Layer_EventPane_setMap (t) {
// MOUSEMOVE test does not seem to work...
// t.plan( 2 );
@@ -97,7 +97,7 @@
}
}
function test_20_Layer_EventPane_setVisibility (t) {
function test_Layer_EventPane_setVisibility (t) {
t.plan( 2 );
layer = new OpenLayers.Layer.EventPane('Test Layer');
layer.setVisibility(false);

View File

@@ -4,7 +4,7 @@
<script type="text/javascript">
var layer;
function test_01_Layer_FixedZoomLevels (t) {
function test_Layer_FixedZoomLevels (t) {
t.plan( 39 );
var layer = { 'MIN_ZOOM_LEVEL': 5,

View File

@@ -15,7 +15,7 @@
gml2 = "." + gml2;
}
function test_01_Layer_GML_constructor(t) {
function test_Layer_GML_constructor(t) {
t.plan(3);
var layer = new OpenLayers.Layer.GML(name);

View File

@@ -15,7 +15,7 @@
atom_xml = "." + atom_xml;
}
function test_01_Layer_GeoRSS_constructor (t) {
function test_Layer_GeoRSS_constructor (t) {
t.plan( 5 );
layer = new OpenLayers.Layer.GeoRSS('Test Layer', georss_txt );
t.ok( layer instanceof OpenLayers.Layer.GeoRSS, "new OpenLayers.Layer.GeoRSS returns object" );
@@ -38,7 +38,7 @@
} );
}
function test_01_Layer_GeoRSS_AtomParsing (t) {
function test_Layer_GeoRSS_AtomParsing (t) {
t.plan( 6 );
layer = new OpenLayers.Layer.GeoRSS('Test Layer', atom_xml );
t.ok( layer instanceof OpenLayers.Layer.GeoRSS, "new OpenLayers.Layer.GeoRSS returns object" );
@@ -54,7 +54,7 @@
} );
}
function test_02_Layer_GeoRSS_draw (t) {
function test_Layer_GeoRSS_draw (t) {
// t.plan(5);
t.plan( 2 );
layer = new OpenLayers.Layer.GeoRSS('Test Layer', georss_txt);
@@ -71,7 +71,7 @@
});;
}
function test_03_Layer_GeoRSS_events (t) {
function test_Layer_GeoRSS_events (t) {
t.plan( 4 );
layer = new OpenLayers.Layer.GeoRSS('Test Layer', georss_txt);
var map = new OpenLayers.Map('map');
@@ -142,7 +142,7 @@
});
}
function test_04_Layer_GeoRSS_icon(t) {
function test_Layer_GeoRSS_icon(t) {
t.plan( 3 );
layer = new OpenLayers.Layer.GeoRSS('Test Layer', georss_txt);
var the_icon = new OpenLayers.Icon('http://boston.openguides.org/markers/AQUA.png');
@@ -183,7 +183,7 @@
}
}
function test_99_Layer_GeoRSS_destroy (t) {
function test_Layer_GeoRSS_destroy (t) {
t.plan( 1 );
layer = new OpenLayers.Layer.GeoRSS('Test Layer', georss_txt);
var map = new OpenLayers.Map('map');

View File

@@ -18,7 +18,7 @@
}
}
function test_01_Layer_Google_constructor (t) {
function test_Layer_Google_constructor (t) {
if(validkey) {
t.plan( 4 );
@@ -40,7 +40,7 @@
}
}
function test_02_Layer_Google_isBaseLayer (t) {
function test_Layer_Google_isBaseLayer (t) {
if(validkey) {
t.plan(1);
@@ -54,7 +54,7 @@
}
}
function test_03_Layer_Google_Translation_lonlat (t) {
function test_Layer_Google_Translation_lonlat (t) {
if(validkey) {
t.plan( 4 );
@@ -114,7 +114,7 @@
}
}
function test_04_Layer_Google_Translation_pixel (t) {
function test_Layer_Google_Translation_pixel (t) {
if(validkey) {
t.plan( 4 );
@@ -144,7 +144,7 @@
}
}
function test_99_Layer_destroy (t) {
function test_Layer_destroy (t) {
if(validkey) {
t.plan( 5 );
@@ -215,7 +215,7 @@
window.location.host);
}
}
function test_02_Layer_Google_isBaseLayer (t) {
function test_Layer_Google_isBaseLayer (t) {
if(validkey) {
t.plan(3);
var map = new OpenLayers.Map( 'map' ,

View File

@@ -22,7 +22,7 @@
*/
function test_01_Layer_Grid_constructor (t) {
function test_Layer_Grid_constructor (t) {
t.plan( 5 );
layer = new OpenLayers.Layer.Grid(name, url, params, null);
@@ -35,7 +35,7 @@
}
function test_02_Layer_Grid_inittiles (t) {
function test_Layer_Grid_inittiles (t) {
t.plan( 2 );
var map = new OpenLayers.Map('map');
layer = new OpenLayers.Layer.WMS(name, url, params);
@@ -46,7 +46,7 @@
}
function test_03_Layer_Grid_clearTiles (t) {
function test_Layer_Grid_clearTiles (t) {
t.plan(3);
var map = new OpenLayers.Map('map');
@@ -90,7 +90,7 @@
}
function test_04_Layer_Grid_getTilesBounds(t) {
function test_Layer_Grid_getTilesBounds(t) {
t.plan( 4 );
layer = new OpenLayers.Layer.WMS(name, url, params);
@@ -127,7 +127,7 @@
}
function test_05_Layer_Grid_getResolution(t) {
function test_Layer_Grid_getResolution(t) {
t.plan( 1 );
var map = new OpenLayers.Map('map');
@@ -139,7 +139,7 @@
t.eq( layer.getResolution(), 0.0439453125, "getResolution() returns correct value");
}
function test_06_Layer_Grid_getZoomForExtent(t) {
function test_Layer_Grid_getZoomForExtent(t) {
t.plan( 2 );
var bounds, zoom;
@@ -158,7 +158,7 @@
t.eq( zoom, 2, "getZoomForExtent() returns correct value");
}
function test_07_Layer_Grid_moveTo(t) {
function test_Layer_Grid_moveTo(t) {
t.plan(13);
@@ -316,7 +316,7 @@
*
*/
function test_10_Layer_Grid_clone(t) {
function test_Layer_Grid_clone(t) {
t.plan(5);
var options = {tileSize: new OpenLayers.Size(500,50)};
@@ -343,7 +343,7 @@
layer.grid = null;
}
function test_11_Layer_Grid_setTileSize(t) {
function test_Layer_Grid_setTileSize(t) {
t.plan(1);
OpenLayers.Layer.HTTPRequest.prototype._setTileSize =
@@ -372,7 +372,7 @@
OpenLayers.Layer.HTTPRequest.prototype._setTileSize;
}
function test_12_Layer_Grid_initSingleTile(t) {
function test_Layer_Grid_initSingleTile(t) {
t.plan( 11 );
layer = new OpenLayers.Layer.Grid(name, url, params, {
@@ -427,7 +427,7 @@
}
function test_14_Layer_Grid_addTileMonitoringHooks(t) {
function test_Layer_Grid_addTileMonitoringHooks(t) {
t.plan(14);
layer = new OpenLayers.Layer.Grid();
@@ -488,7 +488,7 @@
t.eq(layer.numLoadingTiles, 0, "numLoadingTiles decremented");
}
function test_15_Layer_Grid_removeTileMonitoringHooks(t) {
function test_Layer_Grid_removeTileMonitoringHooks(t) {
t.plan(2);
layer = new OpenLayers.Layer.Grid();
@@ -516,7 +516,7 @@
t.ok( entry && entry[0] == layer && entry[1] == tile.onLoadEnd, "loadend correctly unregistered");
}
function test_16_Layer_Grid_tileSizeIsInteger(t) {
function test_Layer_Grid_tileSizeIsInteger(t) {
t.plan(1);
var map = new OpenLayers.Map('map');
@@ -530,7 +530,7 @@
height = layer.tileSize.h;
t.ok(width == parseInt(width) && height == parseInt(height), "calculated tileSize width/height are integer values");
}
function test_12_Layer_Grid_getTileBounds(t) {
function test_Layer_Grid_getTileBounds(t) {
t.plan(2);
var map = new OpenLayers.Map("map2");
var url = "http://octo.metacarta.com/cgi-bin/mapserv";
@@ -584,7 +584,7 @@
t.eq( layer2.grid.length, 6, "Grid rows with buffer:2" );
}
function test_99_Layer_Grid_destroy (t) {
function test_Layer_Grid_destroy (t) {
t.plan( 5 );

View File

@@ -11,7 +11,7 @@
format: 'image/png'};
var options = { chicken: 151, foo: "bar" };
function test_01_Layer_HTTPRequest_constructor (t) {
function test_Layer_HTTPRequest_constructor (t) {
t.plan( 5 );
layer = new OpenLayers.Layer.HTTPRequest(name, url, params, options);
@@ -31,7 +31,7 @@
}
function test_02_Layer_HTTPRequest_clone (t) {
function test_Layer_HTTPRequest_clone (t) {
t.plan( 6 );
var toClone = new OpenLayers.Layer.HTTPRequest(name, url, params, options);
@@ -55,7 +55,7 @@
}
function test_03_Layer_HTTPRequest_setUrl (t) {
function test_Layer_HTTPRequest_setUrl (t) {
t.plan( 1 );
layer = new OpenLayers.Layer.HTTPRequest(name, url, params, options);
@@ -64,7 +64,7 @@
t.eq( layer.url, "foo", "setUrl() works");
}
function test_05_Layer_HTTPRequest_mergeNewParams (t) {
function test_Layer_HTTPRequest_mergeNewParams (t) {
t.plan( 4 );
layer = new OpenLayers.Layer.HTTPRequest(name, url, params, options);
@@ -89,7 +89,7 @@
}
function test_06_Layer_HTTPRequest_getFullRequestString (t) {
function test_Layer_HTTPRequest_getFullRequestString (t) {
tParams = { layers: 'basic',
format: 'image/png'};
@@ -169,7 +169,7 @@
}
function test_04_Layer_HTTPRequest_selectUrl (t) {
function test_Layer_HTTPRequest_selectUrl (t) {
t.plan( 4 );
layer = new OpenLayers.Layer.HTTPRequest(name, url, params, options);
@@ -181,7 +181,7 @@
t.eq( layer.selectUrl("bbox=0,0,180,90", urls), "wms4", "selectUrl(90,180) returns 2" );
}
function test_99_Layer_HTTPRequest_destroy (t) {
function test_Layer_HTTPRequest_destroy (t) {
t.plan( 6 );
var map = new OpenLayers.Map('map');

View File

@@ -4,7 +4,7 @@
<script type="text/javascript">
var layer;
function test_01_Layer_Image_constructor (t) {
function test_Layer_Image_constructor (t) {
t.plan( 13 );
var options = { chicken: 151, foo: "bar", projection: "none" };
@@ -38,7 +38,7 @@
t.ok( layer.options instanceof Object, "layer.options correctly initialized as a non-null Object" );
}
function test_50_Layer_Image_tileTests (t) {
function test_Layer_Image_tileTests (t) {
t.plan(7);
var map = new OpenLayers.Map('map');
@@ -76,7 +76,7 @@
*/
function test_99_Layer_Image_destroy_before_use (t) {
function test_Layer_Image_destroy_before_use (t) {
t.plan(1);
var map = new OpenLayers.Map('map');
layer = new OpenLayers.Layer.Image('Test', 'http://earthtrends.wri.org/images/maps/4_m_citylights_lg.gif', new OpenLayers.Bounds(-180, -88.759, 180, 88.759), new OpenLayers.Size(580, 288));
@@ -86,7 +86,7 @@
t.ok(true, "destroy() didn't throw an error");
}
function test_99_Layer_Image_destroy (t) {
function test_Layer_Image_destroy (t) {
t.plan( 4 );
var map = new OpenLayers.Map('map');

View File

@@ -16,7 +16,7 @@
function test_01_Layer_KaMap_constructor (t) {
function test_Layer_KaMap_constructor (t) {
t.plan( 1 );
layer = new OpenLayers.Layer.KaMap(name, url, params, units);
@@ -59,7 +59,7 @@
map.destroy();
}
function test_02_Layer_KaMap_inittiles (t) {
function test_Layer_KaMap_inittiles (t) {
t.plan( 2 );
var map = new OpenLayers.Map('map');
layer = new OpenLayers.Layer.KaMap(name, url, params, units);
@@ -71,7 +71,7 @@
}
function test_03_Layer_KaMap_clearTiles (t) {
function test_Layer_KaMap_clearTiles (t) {
t.plan( 1 );
var map = new OpenLayers.Map('map');
layer = new OpenLayers.Layer.KaMap(name, url, params, units);
@@ -89,7 +89,7 @@
}
function test_04_Layer_KaMap_getKaMapBounds(t) {
function test_Layer_KaMap_getKaMapBounds(t) {
t.plan( 1 );
layer = new OpenLayers.Layer.KaMap(name, url, params, units);
@@ -108,7 +108,7 @@
layer.grid = null;
}
function test_05_Layer_KaMap_getResolution(t) {
function test_Layer_KaMap_getResolution(t) {
t.plan( 1 );
var map = new OpenLayers.Map('map');
@@ -121,7 +121,7 @@
map.destroy();
}
function test_06_Layer_KaMap_getZoomForExtent(t) {
function test_Layer_KaMap_getZoomForExtent(t) {
t.plan( 2 );
var bounds, zoom;
@@ -141,7 +141,7 @@
map.destroy();
}
function test_06_Layer_kaMap_mergeNewParams (t) {
function test_Layer_kaMap_mergeNewParams (t) {
t.plan( 4 );
var map = new OpenLayers.Map("map");
@@ -187,7 +187,7 @@
*
*/
function test_10_Layer_KaMap_clone(t) {
function test_Layer_KaMap_clone(t) {
t.plan(5);
var options = {tileSize: new OpenLayers.Size(500,50)};
@@ -216,7 +216,7 @@
map.destroy();
}
function test_11_Layer_KaMap_setMap(t) {
function test_Layer_KaMap_setMap(t) {
t.plan(2);
@@ -231,7 +231,7 @@
t.ok( (layer.tileSize.h == 50) && (layer.tileSize.w == 500), "tileSize has been set correctly");
map.destroy();
}
function test_12_Layer_KaMap_getTileBounds(t) {
function test_Layer_KaMap_getTileBounds(t) {
t.plan(2);
var map = new OpenLayers.Map("map");
var url = "http://octo.metacarta.com/cgi-bin/mapserv";
@@ -251,7 +251,7 @@
map.destroy();
}
function test_99_Layer_KaMap_destroy (t) {
function test_Layer_KaMap_destroy (t) {
t.plan( 3 );

View File

@@ -18,7 +18,7 @@
mapdefinition: 'Library://Samples/Sheboygan/Maps/Sheboygan.MapDefinition'
};
function test_01_Layer_MapGuide_untiled_constructor (t) {
function test_Layer_MapGuide_untiled_constructor (t) {
t.plan( 8 );
var trans_format = "image/png";
@@ -47,7 +47,7 @@
t.eq(layer6.isBaseLayer, true, "transparency == false, wms is baselayer");
}
function test_02_Layer_MapGuide_tiled_constructor (t) {
function test_Layer_MapGuide_tiled_constructor (t) {
t.plan( 5 );
var trans_format = "image/png";
@@ -63,7 +63,7 @@
t.eq( layer.params.version, "1.2.0", "version params set correctly set");
}
function test_03_Layer_MapGuide_inittiles (t) {
function test_Layer_MapGuide_inittiles (t) {
t.plan( 1 );
var map = new OpenLayers.Map('map');
layer = new OpenLayers.Layer.MapGuide(name, url, paramsTiled);
@@ -75,7 +75,7 @@
}
function test_04_Layer_MapGuide_clone (t) {
function test_Layer_MapGuide_clone (t) {
t.plan(4);
var options = {tileSize: new OpenLayers.Size(500,50)};
@@ -101,7 +101,7 @@
map.destroy();
}
function test_05_Layer_MapGuide_isBaseLayer(t) {
function test_Layer_MapGuide_isBaseLayer(t) {
t.plan(3);
var options = {singleTile:true};
@@ -119,7 +119,7 @@
t.ok( !layer.isBaseLayer, "baselayer is false when option is set to false" );
}
function test_06_Layer_MapGuide_mergeNewParams (t) {
function test_Layer_MapGuide_mergeNewParams (t) {
t.plan( 4 );
var options = {singleTile:true};
@@ -147,7 +147,7 @@
map.destroy();
}
function test_99_Layer_MapGuide_destroy (t) {
function test_Layer_MapGuide_destroy (t) {
t.plan( 1 );

View File

@@ -15,7 +15,7 @@
var params = { map: '/mapdata/vmap_wms.map',
layers: 'basic'};
function test_01_Layer_MapServer_constructor (t) {
function test_Layer_MapServer_constructor (t) {
t.plan( 4 );
var url = "http://labs.metacarta.com/cgi-bin/mapserv";
@@ -29,7 +29,7 @@
}
function test_02_Layer_MapServer_addtile (t) {
function test_Layer_MapServer_addtile (t) {
t.plan( 6 );
var url = "http://labs.metacarta.com/cgi-bin/mapserv";
@@ -71,7 +71,7 @@
map.destroy();
}
function test_03_Layer_MapServer_inittiles (t) {
function test_Layer_MapServer_inittiles (t) {
t.plan( 2 );
var map = new OpenLayers.Map('map');
layer = new OpenLayers.Layer.MapServer(name, url, params);
@@ -84,7 +84,7 @@
}
function test_04_Layer_MapServer_clone (t) {
function test_Layer_MapServer_clone (t) {
t.plan(4);
var url = "http://labs.metacarta.com/cgi-bin/mapserv";
@@ -112,7 +112,7 @@
map.destroy();
}
function test_05_Layer_MapServer_isBaseLayer(t) {
function test_Layer_MapServer_isBaseLayer(t) {
t.plan(3);
var url = "http://labs.metacarta.com/cgi-bin/mapserv";
@@ -128,7 +128,7 @@
t.ok( !layer.isBaseLayer, "baselayer is false when option is set to false" );
}
function test_06_Layer_MapServer_mergeNewParams (t) {
function test_Layer_MapServer_mergeNewParams (t) {
t.plan( 4 );
var map = new OpenLayers.Map("map");
@@ -155,7 +155,7 @@
map.destroy();
}
function test_07_Layer_MapServer_getFullRequestString (t) {
function test_Layer_MapServer_getFullRequestString (t) {
t.plan( 3 );
var map = new OpenLayers.Map('map');
tUrl = "http://labs.metacarta.com/cgi-bin/mapserv";
@@ -196,7 +196,7 @@
}
function test_08_Layer_MapServer_setOpacity (t) {
function test_Layer_MapServer_setOpacity (t) {
t.plan( 5 );
var map = new OpenLayers.Map('map');
@@ -221,7 +221,7 @@
}
function test_20_Layer_MapServer_Reproject (t) {
function test_Layer_MapServer_Reproject (t) {
var validkey = (window.location.protocol == "file:") ||
(window.location.host == "localhost") ||
(window.location.host == "openlayers.org");
@@ -259,7 +259,7 @@
map.destroy();
}
function test_30_Layer_MapServer_singleTile (t) {
function test_Layer_MapServer_singleTile (t) {
t.plan( 5 );
var map = new OpenLayers.Map('map');
layer = new OpenLayers.Layer.MapServer(name, url, params, {singleTile: true});
@@ -275,7 +275,7 @@
function test_99_Layer_MapServer_destroy (t) {
function test_Layer_MapServer_destroy (t) {
t.plan( 1 );
@@ -306,7 +306,7 @@
var params = { map: '/mapdata/vmap_wms.map',
layers: 'basic'};
function test_01_Layer_MapServer_Untiled_constructor (t) {
function test_Layer_MapServer_Untiled_constructor (t) {
t.plan( 4 );
var url = "http://labs.metacarta.com/cgi-bin/mapserv";
@@ -320,7 +320,7 @@
}
function test_04_Layer_MapServer_Untiled_clone (t) {
function test_Layer_MapServer_Untiled_clone (t) {
t.plan(3);
var url = "http://labs.metacarta.com/cgi-bin/mapserv";
@@ -343,7 +343,7 @@
map.destroy();
}
function test_05_Layer_MapServer_Untiled_isBaseLayer(t) {
function test_Layer_MapServer_Untiled_isBaseLayer(t) {
t.plan(3);
var url = "http://labs.metacarta.com/cgi-bin/mapserv";
@@ -359,7 +359,7 @@
t.ok( !layer.isBaseLayer, "baselayer is false when option is set to false" );
}
function test_06_Layer_MapServer_Untiled_mergeNewParams (t) {
function test_Layer_MapServer_Untiled_mergeNewParams (t) {
t.plan( 5 );
var map = new OpenLayers.Map("map");
@@ -385,7 +385,7 @@
map.destroy();
}
function test_07_Layer_MapServer_Untiled_getFullRequestString (t) {
function test_Layer_MapServer_Untiled_getFullRequestString (t) {
t.plan( 1 );
@@ -411,7 +411,7 @@
}
function test_08_Layer_MapServer_Untiled_setOpacity (t) {
function test_Layer_MapServer_Untiled_setOpacity (t) {
t.plan( 4 );
var map = new OpenLayers.Map('map');
@@ -443,7 +443,7 @@
t.ok(clone.singleTile, "regression test: clone works. this is for #1013");
}
function test_99_Layer_MapServer_Untiled_destroy (t) {
function test_Layer_MapServer_Untiled_destroy (t) {
t.plan( 1 );

View File

@@ -4,14 +4,14 @@
<script type="text/javascript">
var layer;
function test_01_Layer_Markers_constructor (t) {
function test_Layer_Markers_constructor (t) {
t.plan( 2 );
layer = new OpenLayers.Layer.Markers('Test Layer');
t.ok( layer instanceof OpenLayers.Layer.Markers, "new OpenLayers.Layer.Markers returns object" );
t.eq( layer.name, "Test Layer", "layer.name is correct" );
}
function test_02_Layer_Markers_addlayer (t) {
function test_Layer_Markers_addlayer (t) {
t.plan( 3 );
layer = new OpenLayers.Layer.Markers('Test Layer');
@@ -22,7 +22,7 @@
);
t.eq( layer.markers.length, 1, "addLayer adds marker to layer." );
}
function test_98_Layer_Markers_addMarker_removeMarker (t) {
function test_Layer_Markers_addMarker_removeMarker (t) {
t.plan( 4 );
var map = new OpenLayers.Map('map');
@@ -46,7 +46,7 @@
t.ok(true, "removing marker when no markers present does not script error");
}
function test_99_Layer_Markers_destroy (t) {
function test_Layer_Markers_destroy (t) {
t.plan( 1 );
layer = new OpenLayers.Layer.Markers('Test Layer');
var map = new OpenLayers.Map('map');
@@ -55,7 +55,7 @@
t.eq( layer.map, null, "layer.map is null after destroy" );
}
function test_03_Layer_Markers_getDataExtent(t) {
function test_Layer_Markers_getDataExtent(t) {
t.plan( 4 );
var layer = {};

View File

@@ -5,7 +5,7 @@
<script type="text/javascript">
var layer;
function test_01_Layer_MultiMap_constructor (t) {
function test_Layer_MultiMap_constructor (t) {
t.plan( 4 );
var map = new OpenLayers.Map('map');
@@ -21,7 +21,7 @@
t.ok ( layer.mapObject != null, "MultiMap Object correctly loaded");
}
function test_02_Layer_MultiMap_isBaseLayer (t) {
function test_Layer_MultiMap_isBaseLayer (t) {
t.plan(1);
var layer = new OpenLayers.Layer.MultiMap('Goog Layer');
@@ -29,7 +29,7 @@
t.ok(layer.isBaseLayer, "a default load of google layer responds as a base layer");
}
function test_04_Layer_MultiMap_Translation_lonlat (t) {
function test_Layer_MultiMap_Translation_lonlat (t) {
t.plan( 4 );
@@ -54,7 +54,7 @@
t.ok( layer.getOLLonLatFromMapObjectLonLat(null) == null, "getOLLonLatFromGLatLng(null) returns null");
}
function test_05_Layer_MultiMap_Translation_pixel (t) {
function test_Layer_MultiMap_Translation_pixel (t) {
t.plan( 4 );
@@ -80,7 +80,7 @@
}
function test_99_Layer_destroy (t) {
function test_Layer_destroy (t) {
t.plan( 5 );
var map = new OpenLayers.Map('map');

View File

@@ -5,7 +5,7 @@
var name = "PointTrack Layer";
function test_01_Layer_PointTrack_constructor(t) {
function test_Layer_PointTrack_constructor(t) {
t.plan(2);
var layer = new OpenLayers.Layer.PointTrack(name);
@@ -14,7 +14,7 @@
}
function test_02_Layer_PointTrack_addNodes(t) {
function test_Layer_PointTrack_addNodes(t) {
t.plan(11);
var layer = new OpenLayers.Layer.PointTrack(name,
@@ -58,7 +58,7 @@
}
function test_99_Layer_PointTrack_destroy (t) {
function test_Layer_PointTrack_destroy (t) {
t.plan(3);
layer = new OpenLayers.Layer.PointTrack(name);
var map = new OpenLayers.Map('map');

View File

@@ -10,7 +10,7 @@
var options = {'layername':'basic', 'type':'png'};
function test_01_Layer_TMS_constructor (t) {
function test_Layer_TMS_constructor (t) {
t.plan( 1 );
layer = new OpenLayers.Layer.TMS(name, url, options);
@@ -19,7 +19,7 @@
function test_03_Layer_TMS_clearTiles (t) {
function test_Layer_TMS_clearTiles (t) {
t.plan( 1 );
var map = new OpenLayers.Map('map');
layer = new OpenLayers.Layer.TMS(name, url, options);
@@ -37,7 +37,7 @@
}
function test_04_Layer_TMS_getTMSBounds(t) {
function test_Layer_TMS_getTMSBounds(t) {
t.plan( 1 );
layer = new OpenLayers.Layer.TMS(name, url, options);
@@ -56,7 +56,7 @@
layer.grid = null;
}
function test_05_Layer_TMS_getResolution(t) {
function test_Layer_TMS_getResolution(t) {
t.plan( 1 );
var map = new OpenLayers.Map('map');
@@ -69,7 +69,7 @@
map.destroy();
}
function test_06_Layer_TMS_getZoomForExtent(t) {
function test_Layer_TMS_getZoomForExtent(t) {
t.plan( 2 );
var bounds, zoom;
@@ -107,7 +107,7 @@
*
*/
function test_10_Layer_TMS_getURL(t) {
function test_Layer_TMS_getURL(t) {
t.plan(3);
@@ -142,7 +142,7 @@
}
function test_11_Layer_TMS_setMap(t) {
function test_Layer_TMS_setMap(t) {
t.plan(3);
@@ -157,7 +157,7 @@
map.destroy();
}
function test_99_Layer_TMS_destroy (t) {
function test_Layer_TMS_destroy (t) {
t.plan( 3 );

View File

@@ -17,7 +17,7 @@
datafile_overflow = "." + datafile_overflow;
}
function test_01_Layer_Text_constructor (t) {
function test_Layer_Text_constructor (t) {
t.plan( 5 );
layer = new OpenLayers.Layer.Text('Test Layer', { location: datafile });
@@ -32,7 +32,7 @@
t.eq( layer.markers[0].icon.url, 'http://boston.openguides.org/markers/ORANGE.png', "icon" );
} );
}
function test_02_Layer_Text_draw (t) {
function test_Layer_Text_draw (t) {
// t.plan(5);
t.plan( 2 );
layer = new OpenLayers.Layer.Text('Test Layer', { location: datafile });
@@ -58,7 +58,7 @@
*/
});;
}
function test_03_Layer_Text_events (t) {
function test_Layer_Text_events (t) {
t.plan( 5 );
layer = new OpenLayers.Layer.Text('Test Layer', { location: datafile2 });
var map = new OpenLayers.Map('map');
@@ -81,7 +81,7 @@
t.eq(map.popups[0].contentDiv.style[prop],"auto", "default Popup overflow correct");
});
}
function test_03_Layer_Text_overflow (t) {
function test_Layer_Text_overflow (t) {
t.plan( 4 );
layer = new OpenLayers.Layer.Text('Test Layer', { location: datafile_overflow });
var map = new OpenLayers.Map('map');
@@ -105,7 +105,7 @@
t.eq(map.popups[0].contentDiv.style[prop],"hidden", "Popup overflow read from file");
});
}
function test_04_Layer_Text_events_nopopups (t) {
function test_Layer_Text_events_nopopups (t) {
t.plan( 4 );
layer = new OpenLayers.Layer.Text('Test Layer', { location: datafile });
var map = new OpenLayers.Map('map');
@@ -139,7 +139,7 @@
});
}
function test_99_Layer_Text_destroy (t) {
function test_Layer_Text_destroy (t) {
t.plan( 1 );
layer = new OpenLayers.Layer.Text('Test Layer');
var map = new OpenLayers.Map('map');

View File

@@ -5,7 +5,7 @@
function test_01_Layer_TileCache_constructor (t) {
function test_Layer_TileCache_constructor (t) {
t.plan( 1 );
var name = 'Test Layer';
@@ -35,7 +35,7 @@
layer.destroy();
}
function test_03_Layer_TileCache_clearTiles (t) {
function test_Layer_TileCache_clearTiles (t) {
t.plan( 1 );
var name = 'Test Layer';
var url = "http://labs.metacarta.com/wms-c/Basic.py/";
@@ -57,7 +57,7 @@
}
function test_04_Layer_TileCache_getTileCacheBounds(t) {
function test_Layer_TileCache_getTileCacheBounds(t) {
t.plan( 1 );
var name = 'Test Layer';
@@ -79,7 +79,7 @@
}
function test_05_Layer_TileCache_getResolution(t) {
function test_Layer_TileCache_getResolution(t) {
t.plan( 1 );
var name = 'Test Layer';
@@ -96,7 +96,7 @@
map.destroy();
}
function test_06_Layer_TileCache_getZoomForExtent(t) {
function test_Layer_TileCache_getZoomForExtent(t) {
t.plan( 2 );
var bounds, zoom;
@@ -120,7 +120,7 @@
map.destroy();
}
function test_10_Layer_TileCache_getURL(t) {
function test_Layer_TileCache_getURL(t) {
t.plan(2);
@@ -141,7 +141,7 @@
map.destroy();
}
function test_11_Layer_TileCache_setMap(t) {
function test_Layer_TileCache_setMap(t) {
t.plan(3);
@@ -160,7 +160,7 @@
map.destroy();
}
function test_99_Layer_TileCache_destroy (t) {
function test_Layer_TileCache_destroy (t) {
t.plan( 3 );

View File

@@ -5,7 +5,7 @@
var name = "Vector Layer";
function test_01_Layer_Vector_constructor(t) {
function test_Layer_Vector_constructor(t) {
t.plan(3);
var layer = new OpenLayers.Layer.Vector(name);
@@ -15,7 +15,7 @@
}
function test_02_Layer_Vector_addFeatures(t) {
function test_Layer_Vector_addFeatures(t) {
t.plan(4);
var layer = new OpenLayers.Layer.Vector(name);
@@ -45,7 +45,7 @@
layer.addFeatures([pointFeature], {silent: true});
}
function test_03_Layer_Vector_removeFeatures(t) {
function test_Layer_Vector_removeFeatures(t) {
t.plan(3);
var layer = new OpenLayers.Layer.Vector(name);
@@ -165,7 +165,7 @@
t.eq(layer.selectedFeatures, [], "destroyFeatures removes appropriate selected features");
}
function test_99_Layer_Vector_destroy (t) {
function test_Layer_Vector_destroy (t) {
t.plan(2);
layer = new OpenLayers.Layer.Vector(name);
var map = new OpenLayers.Map('map');

View File

@@ -14,7 +14,7 @@
layers: 'basic',
format: 'image/jpeg'};
function test_01_Layer_WMS_constructor (t) {
function test_Layer_WMS_constructor (t) {
t.plan( 13 );
var trans_format = "image/png";
@@ -54,7 +54,7 @@
t.eq(layer6.isBaseLayer, true, "transparency == false, wms is baselayer");
}
function test_02_Layer_WMS_addtile (t) {
function test_Layer_WMS_addtile (t) {
t.plan( 6 );
var url = "http://octo.metacarta.com/cgi-bin/mapserv";
@@ -132,7 +132,7 @@
map.destroy();
}
function test_03_Layer_WMS_inittiles (t) {
function test_Layer_WMS_inittiles (t) {
t.plan( 2 );
var map = new OpenLayers.Map('map');
layer = new OpenLayers.Layer.WMS(name, url, params);
@@ -144,7 +144,7 @@
}
function test_04_Layer_WMS_clone (t) {
function test_Layer_WMS_clone (t) {
t.plan(4);
var url = "http://octo.metacarta.com/cgi-bin/mapserv";
@@ -172,7 +172,7 @@
map.destroy();
}
function test_05_Layer_WMS_isBaseLayer(t) {
function test_Layer_WMS_isBaseLayer(t) {
t.plan(3);
var url = "http://octo.metacarta.com/cgi-bin/mapserv";
@@ -188,7 +188,7 @@
t.ok( !layer.isBaseLayer, "baselayer is false when option is set to false" );
}
function test_06_Layer_WMS_mergeNewParams (t) {
function test_Layer_WMS_mergeNewParams (t) {
t.plan( 4 );
var map = new OpenLayers.Map("map");
@@ -216,7 +216,7 @@
map.destroy();
}
function test_07_Layer_WMS_getFullRequestString (t) {
function test_Layer_WMS_getFullRequestString (t) {
t.plan( 2 );
@@ -249,7 +249,7 @@
}
function test_08_Layer_WMS_setOpacity (t) {
function test_Layer_WMS_setOpacity (t) {
t.plan( 5 );
var map = new OpenLayers.Map('map');
@@ -274,7 +274,7 @@
map.destroy();
}
function test_20_Layer_WMS_Reproject (t) {
function test_Layer_WMS_Reproject (t) {
var validkey = (window.location.protocol == "file:") ||
(window.location.host == "localhost") ||
(window.location.host == "openlayers.org");
@@ -314,7 +314,7 @@
map.destroy();
}
function test_21_Layer_WMS_noGutters (t) {
function test_Layer_WMS_noGutters (t) {
t.plan(2);
var map = new OpenLayers.Map('map');
var layer = new OpenLayers.Layer.WMS("no gutter layer", url, params, {gutter: 0});
@@ -334,7 +334,7 @@
map.destroy();
}
function test_22_Layer_WMS_gutters (t) {
function test_Layer_WMS_gutters (t) {
t.plan(2);
var gutter = 15;
var map = new OpenLayers.Map('map');
@@ -367,7 +367,7 @@
t.ok(clone.singleTile, "regression test: clone works. this is for #1013");
}
function test_99_Layer_WMS_destroy (t) {
function test_Layer_WMS_destroy (t) {
t.plan( 1 );

View File

@@ -5,7 +5,7 @@
<script type="text/javascript">
var layer;
function test_01_Layer_Yahoo_constructor (t) {
function test_Layer_Yahoo_constructor (t) {
t.plan( 4 );
var tempEventPane = OpenLayers.Layer.EventPane.prototype.initialize;
@@ -29,7 +29,7 @@
OpenLayers.Layer.FixedZoomLevels.prototype.initialize = tempFixedZoomLevels;
}
function test_02_Layer_Yahoo_loadMapObject(t) {
function test_Layer_Yahoo_loadMapObject(t) {
t.plan(5);
var temp = YMap;
@@ -67,7 +67,7 @@
YMap = temp;
}
function test_03_Layer_Yahoo_onMapResize(t) {
function test_Layer_Yahoo_onMapResize(t) {
t.plan(2);
g_MapSize = {};
@@ -92,7 +92,7 @@
l.onMapResize();
}
function test_04_Layer_Yahoo_getMapObjectSizeFromOLSize(t) {
function test_Layer_Yahoo_getMapObjectSizeFromOLSize(t) {
t.plan(2);
var temp = YSize;

View File

@@ -6,7 +6,7 @@
var isMozilla = (navigator.userAgent.indexOf("compatible") == -1);
var map;
function test_01_Map_constructor (t) {
function test_Map_constructor (t) {
t.plan( 10 );
map = new OpenLayers.Map('map');
@@ -43,7 +43,7 @@
"maxExtent is correct after calling setOptions");
}
function test_02_Map_center(t) {
function test_Map_center(t) {
t.plan(3);
map = new OpenLayers.Map('map');
var baseLayer = new OpenLayers.Layer.WMS("Test Layer",
@@ -57,7 +57,7 @@
t.ok( map.getCenter().equals(ll), "map center is correct after calling setCenter");
}
function test_03_Map_add_layers(t) {
function test_Map_add_layers(t) {
t.plan(6);
map = new OpenLayers.Map('map');
var layer1 = new OpenLayers.Layer.WMS("Layer 1",
@@ -77,7 +77,7 @@
"layer2 zIndex is set" );
}
function test_04_Map_options(t) {
function test_Map_options(t) {
t.plan(3);
map = new OpenLayers.Map('map', {numZoomLevels: 6, maxResolution: 3.14159, theme: 'foo'});
t.eq( map.numZoomLevels, 6, "map.numZoomLevels set correctly via options hashtable" );
@@ -111,7 +111,7 @@
map2.destroy();
}
function test_05_Map_center(t) {
function test_Map_center(t) {
t.plan(4);
map = new OpenLayers.Map('map');
var baseLayer = new OpenLayers.Layer.WMS("Test Layer",
@@ -139,7 +139,7 @@
}
function test_06_Map_zoomend_event (t) {
function test_Map_zoomend_event (t) {
t.plan(2);
map = new OpenLayers.Map('map');
@@ -156,7 +156,7 @@
map.zoomOut();
}
function test_07_Map_add_remove_popup (t) {
function test_Map_add_remove_popup (t) {
t.plan(4);
map = new OpenLayers.Map('map');
@@ -262,7 +262,7 @@
}
*/
function test_09_Map_isValidLonLat(t) {
function test_Map_isValidLonLat(t) {
t.plan( 3 );
map = new OpenLayers.Map('map');
@@ -277,7 +277,7 @@
t.ok( !map.isValidLonLat(new OpenLayers.LonLat(10, 10)), "lonlat outside max extent is not valid" );
}
function test_10_Map_getLayer(t) {
function test_Map_getLayer(t) {
var numLayers = 3;
t.plan( numLayers + 1 );
@@ -581,7 +581,7 @@
}
function test_11_Map_double_addLayer(t) {
function test_Map_double_addLayer(t) {
t.plan( 1 );
map = new OpenLayers.Map($('map'));
@@ -596,7 +596,7 @@
}
function test_12_Map_setBaseLayer(t) {
function test_Map_setBaseLayer(t) {
t.plan( 4 );
map = new OpenLayers.Map('map');
@@ -693,7 +693,7 @@
"correct z-index after removeLayer");
}
function test_13_Map_setBaseLayer_after_pan (t) {
function test_Map_setBaseLayer_after_pan (t) {
t.plan(1);
map = new OpenLayers.Map('map');
@@ -712,7 +712,7 @@
t.eq(map.layerContainerDiv.style.top, "0px", "layerContainer is recentered after setBaseLayer");
}
function test_14_Map_moveLayer (t) {
function test_Map_moveLayer (t) {
t.plan(10);
var ct = 0;
@@ -752,7 +752,7 @@
t.eq( ct, 3, "raiseLayer triggered changelayer the right # of times" );
}
function test_15_Map_moveTo(t) {
function test_Map_moveTo(t) {
t.plan(1);
map = new OpenLayers.Map('map');
@@ -766,7 +766,7 @@
t.ok(map.getCenter().equals(new OpenLayers.LonLat(0,0)), "safely sets out-of-bounds lonlat");
}
function test_16_Map_defaultTheme(t) {
function test_Map_defaultTheme(t) {
t.plan(5);
var links = document.getElementsByTagName('link');
@@ -790,7 +790,7 @@
"calling the map constructor twice with the same theme doesn't add duplicate link nodes");
}
function test_17_Map_customTheme(t) {
function test_Map_customTheme(t) {
t.plan(5);
var customTheme = 'foo';
@@ -814,7 +814,7 @@
t.eq(themeNode.type, "text/css", "node added has type set to text/css");
}
function test_18_Map_noTheme(t) {
function test_Map_noTheme(t) {
t.plan(1);
var head = document.getElementsByTagName('head')[0];
@@ -826,7 +826,7 @@
t.eq(nodeCount, head.childNodes.length, "with no theme, a node is not added to document head" );
}
function test_19_Map_getControl(t) {
function test_Map_getControl(t) {
t.plan(2);
var map1 = new OpenLayers.Map('map');
@@ -841,7 +841,7 @@
t.ok(gotControl == null, "getControl() for bad id returns null");
}
function test_19_Map_removeControl(t) {
function test_Map_removeControl(t) {
t.plan(6);
var oldNumControls, newNumControls;
@@ -1001,7 +1001,7 @@
map.destroy();
}
function test_99_Map_destroy (t) {
function test_Map_destroy (t) {
t.plan( 3 );
map = new OpenLayers.Map('map');
map.destroy();

View File

@@ -5,7 +5,7 @@
var marker;
function test_01_Marker_constructor (t) {
function test_Marker_constructor (t) {
t.plan( 4 );
var ll = new OpenLayers.LonLat(2,1);
marker = new OpenLayers.Marker(ll,new OpenLayers.Icon());
@@ -15,7 +15,7 @@
t.ok( marker.lonlat.equals(ll), "marker.lonlat returns correct" );
}
function test_02_Marker_onScreen(t) {
function test_Marker_onScreen(t) {
t.plan( 2 );
var map = new OpenLayers.Map("map");
@@ -46,7 +46,7 @@
map.destroy();
}
function test_03_Marker_setOpacity(t) {
function test_Marker_setOpacity(t) {
t.plan( 2 );
var map = new OpenLayers.Map("map");
@@ -74,7 +74,7 @@
map.destroy();
}
function test_03_Marker_setUrl(t) {
function test_Marker_setUrl(t) {
t.plan( 2 );
var map = new OpenLayers.Map("map");
@@ -102,7 +102,7 @@
map.destroy();
}
function test_04_Marker_moveTo(t) {
function test_Marker_moveTo(t) {
t.plan( 6 );
var map = new OpenLayers.Map("map");

View File

@@ -4,7 +4,7 @@
<script type="text/javascript">
var box;
function test_01_Box_constructor (t) {
function test_Box_constructor (t) {
t.plan( 7 );
OpenLayers.Marker.Box.prototype._setBorder =
@@ -38,7 +38,7 @@
}
function test_02_Box_setBorder(t) {
function test_Box_setBorder(t) {
t.plan( 2 );
var box = {
@@ -61,7 +61,7 @@
t.eq(box.div.style.border, borderWidth + "px solid " + borderColor, "style correctly set with both good values");
}
function test_03_Box_draw(t) {
function test_Box_draw(t) {
t.plan( 5 );
OpenLayers.Util._modifyDOMElement =
@@ -97,7 +97,7 @@
}
function test_04_Box_onScreen(t) {
function test_Box_onScreen(t) {
t.plan( 2 );
var map = new OpenLayers.Map("map");
@@ -128,7 +128,7 @@
map.destroy();
}
function test_05_Box_display(t) {
function test_Box_display(t) {
t.plan( 2 );
var box = {
@@ -148,7 +148,7 @@
t.eq(box.div.style.display, "none", "style.display correctly set to 'none' when display(false)");
}
function test_99_Box_destroy(t) {
function test_Box_destroy(t) {
t.plan(3);
OpenLayers.Marker.prototype._destroy =

View File

@@ -5,7 +5,7 @@
var popup;
function test_01_Popup_default_constructor(t) {
function test_Popup_default_constructor(t) {
t.plan( 8 );
var size = new OpenLayers.Size(OpenLayers.Popup.WIDTH,
@@ -28,7 +28,7 @@
t.ok(newID != firstID, "default id generator creating unique ids");
}
function test_02_Popup_constructor (t) {
function test_Popup_constructor (t) {
t.plan( 8 );
var id = "chicken";
@@ -85,7 +85,7 @@
popup.updatePosition();
t.ok(true, "update position doesn't fail when getLayerPxFromLonLat fails.");
}
function test_03_Popup_draw(t) {
function test_Popup_draw(t) {
t.plan( 17 );
var id = "chicken";

View File

@@ -5,7 +5,7 @@
var popup;
function test_01_Popup_Anchored_default_constructor(t) {
function test_Popup_Anchored_default_constructor(t) {
t.plan( 4 );
popup = new OpenLayers.Popup.Anchored();

View File

@@ -2,7 +2,7 @@
<head>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
function test_01_Projection_constructor(t) {
function test_Projection_constructor(t) {
t.plan(9);
var options = {'foo': 'bar'};

View File

@@ -4,7 +4,7 @@
<script type="text/javascript">
var tile;
function test_01_Tile_constructor (t) {
function test_Tile_constructor (t) {
t.plan( 12 );
var layer = {}; // bogus layer
@@ -31,7 +31,7 @@
t.ok( tile.events != null, "tile's events intitialized");
}
function test_02_Tile_clone (t) {
function test_Tile_clone (t) {
t.plan( 10 );
var layer = {}; // bogus layer
@@ -57,7 +57,7 @@
t.ok( clone.events != null, "clone's events intitialized");
}
function test_99_Tile_destroy(t) {
function test_Tile_destroy(t) {
t.plan( 6 );
var layer = {

View File

@@ -5,7 +5,7 @@
var isMozilla = (navigator.userAgent.indexOf("compatible") == -1);
var tile;
function test_01_Tile_Image_constructor (t) {
function test_Tile_Image_constructor (t) {
t.plan( 6 );
var layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
@@ -25,7 +25,7 @@
t.ok( tile.size.equals(size), "tile.size is set correctly");
}
function test_02_Tile_Image_clone (t) {
function test_Tile_Image_clone (t) {
t.plan( 9 );
var layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
@@ -50,7 +50,7 @@
t.ok( clone.imgDiv == null, "clone's imgDiv was not copied");
}
function test_03_Tile_Image_draw (t) {
function test_Tile_Image_draw (t) {
t.plan( 7 );
var map = new OpenLayers.Map('map');
@@ -104,7 +104,7 @@
tile.draw();
}
function test_04_Tile_Image_OutsideMaxExtent(t) {
function test_Tile_Image_OutsideMaxExtent(t) {
t.plan( 11 );
var position = new OpenLayers.Pixel(20,30);
var bounds = new OpenLayers.Bounds(1,2,3,4);
@@ -186,7 +186,7 @@
"http://labs.metacarta.com/wms/vmap0?" + OpenLayers.Util.getParameterString(tParams),
"Image covering more than all of extent loads");
}
function test_05_Tile_Image_Display_After_Move(t) {
function test_Tile_Image_Display_After_Move(t) {
t.plan(2);
var position = new OpenLayers.Pixel(20,30);
var bounds = new OpenLayers.Bounds(1,2,3,4);
@@ -211,7 +211,7 @@
}
function test_06_Tile_Image_gutters(t) {
function test_Tile_Image_gutters(t) {
t.plan(5);
var gutter = 0;

View File

@@ -4,7 +4,7 @@
<script type="text/javascript">
var tile;
function test_01_Tile_WFS_constructor (t) {
function test_Tile_WFS_constructor (t) {
t.plan( 8 );
var layer = {}; // bogus layer

View File

@@ -5,13 +5,13 @@
var isMozilla = (navigator.userAgent.indexOf("compatible") == -1);
var map;
function test_01_Util_getImagesLocation (t) {
function test_Util_getImagesLocation (t) {
t.plan( 1 );
t.ok( OpenLayers.Util.getImagesLocation(), "../img/",
"getImagesLocation()" );
}
function test_03_Util_Array(t) {
function test_Util_Array(t) {
t.plan( 2 );
var array = new Array(1,2,3,4,4,5);
@@ -22,14 +22,14 @@
t.eq( array.toString(), "1,2,5", "Util.removeItem works on more than one element ");
}
function test_03_Util_pagePosition(t) {
function test_Util_pagePosition(t) {
t.plan( 1 );
var pp = OpenLayers.Util.pagePosition(window);
t.eq( pp.toString(), "0,0", "Page position doesn't bail if passed 'window'")
}
function test_04_Util_createDiv(t) {
function test_Util_createDiv(t) {
t.plan( 24 );
var id = "boo";
@@ -107,7 +107,7 @@
}
function test_05_Util_createImage(t) {
function test_Util_createImage(t) {
t.plan( 22 );
var img = "http://www.openlayers.org/images/OpenLayers.trac.png";
@@ -200,7 +200,7 @@
t.eq(to.n, null, "correctly preserves null");
}
function test_07_Util_getParameterString(t) {
function test_Util_getParameterString(t) {
t.plan( 4 );
var params = {
@@ -221,7 +221,7 @@
t.eq( OpenLayers.Util.getParameterString(params), "foo=bar,baz%2C", "getParameterString returns with list of CSVs when given a list. ");
}
function test_08_Util_createAlphaImageDiv(t) {
function test_Util_createAlphaImageDiv(t) {
t.plan( 19 );
var img = "http://www.openlayers.org/images/OpenLayers.trac.png";
@@ -359,7 +359,7 @@
"element.style.filter is removed when opacity = " + opacity);
}
function test_09_Util_modifyDOMElement(t) {
function test_Util_modifyDOMElement(t) {
t.plan( 10 );
var id = "boo";
@@ -399,7 +399,7 @@
t.eq( element.style.filter, filterString, "element.style.filter set correctly");
}
function test_09_Util_modifyAlphaImageDiv(t) {
function test_Util_modifyAlphaImageDiv(t) {
t.plan( 19 );
var imageDiv = OpenLayers.Util.createAlphaImageDiv();
@@ -488,7 +488,7 @@
}
function test_10_Util_upperCaseObject(t) {
function test_Util_upperCaseObject(t) {
t.plan(8);
var aKey = "chicken";
@@ -518,7 +518,7 @@
t.eq(uObj[bKey.toUpperCase()], bValue, "new uppercase value present");
}
function test_11_Util_createUniqueID(t) {
function test_Util_createUniqueID(t) {
t.plan(2);
var id = OpenLayers.Util.createUniqueID();
@@ -530,7 +530,7 @@
"OpenLayers.Util.createUniqueID starts id correctly");
}
function test_13_Util_normalizeScale(t) {
function test_Util_normalizeScale(t) {
t.plan(2);
//normal scale
@@ -542,7 +542,7 @@
t.eq( OpenLayers.Util.normalizeScale(scale), 1/5, "normalizing a wrong scale works!");
}
function test_13_Util_getScaleResolutionTranslation(t) {
function test_Util_getScaleResolutionTranslation(t) {
t.plan(4);
var scale = 1/150000000;
@@ -562,7 +562,7 @@
t.eq(OpenLayers.Util.getScaleFromResolution(resolution), scale, "scale->resolution->scale works");
}
function test_14_Util_getImgLocation(t) {
function test_Util_getImgLocation(t) {
t.plan(3);
OpenLayers.ImgPath = "foo/";
@@ -574,7 +574,7 @@
t.eq(OpenLayers.Util.getImagesLocation().substr(OpenLayers.Util.getImagesLocation().length-4,4), "img/", "ImgPath works as expected when set to ''.");
}
function test_15_Util_isEquivalentUrl(t) {
function test_Util_isEquivalentUrl(t) {
t.plan(8);
var url1, url2, options;