From 37cca389589922e20763c497d4721f7da473e7d1 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Thu, 15 Jan 2009 21:30:39 +0000 Subject: [PATCH] Reverting changes from r8664 that were inadvertently committed to the trunk. This gets the SelectFeature control tests passing again. (see #1666) git-svn-id: http://svn.openlayers.org/trunk/openlayers@8675 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- tests/Control/SelectFeature.html | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/Control/SelectFeature.html b/tests/Control/SelectFeature.html index 8d35f64be8..580327c6ea 100644 --- a/tests/Control/SelectFeature.html +++ b/tests/Control/SelectFeature.html @@ -11,7 +11,7 @@ var control = new OpenLayers.Control.SelectFeature(layer, options); t.ok(control instanceof OpenLayers.Control.SelectFeature, "new OpenLayers.Control.SelectFeature returns an instance"); - t.eq(control.layers[0], "bar", + t.eq(control.layer, "bar", "constructor sets layer correctly"); // t.eq(control.handlers.feature.geometryTypes, "foo", // "constructor sets options correctly on feature handler"); @@ -74,15 +74,14 @@ features[i] = { id: Math.random(), tested: 0, - style: "", - layer: layer + style: "" }; } // test that onSelect gets called properly control.onSelect = function(feature) { feature.tested += 1; - t.eq(feature.id, features[feature.index].id, + t.eq(feature, features[feature.index], "onSelect called with proper feature (" + feature.index + ")"); t.eq(feature.tested, feature.test, "onSelect called only once for feature (" + feature.index + ")"); @@ -91,7 +90,7 @@ // test that onUnselect gets called properly control.onUnselect = function(feature) { feature.tested += 1; - t.eq(feature.id, features[feature.index].id, + t.eq(feature, features[feature.index], "onUnselect called with proper feature (" + feature.index + ")"); t.eq(feature.tested, feature.test, "onUnselect called only once for feature (" + feature.index + ")");