From 34599e7f50950843722460ad4f17cdeefe77ff7a Mon Sep 17 00:00:00 2001 From: ahocevar Date: Wed, 14 Jan 2009 23:16:53 +0000 Subject: [PATCH] updated sandbox with singleroot.3.patch from #1666 git-svn-id: http://svn.openlayers.org/trunk/openlayers@8664 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- tests/Control/SelectFeature.html | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/Control/SelectFeature.html b/tests/Control/SelectFeature.html index 580327c6ea..8d35f64be8 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.layer, "bar", + t.eq(control.layers[0], "bar", "constructor sets layer correctly"); // t.eq(control.handlers.feature.geometryTypes, "foo", // "constructor sets options correctly on feature handler"); @@ -74,14 +74,15 @@ features[i] = { id: Math.random(), tested: 0, - style: "" + style: "", + layer: layer }; } // test that onSelect gets called properly control.onSelect = function(feature) { feature.tested += 1; - t.eq(feature, features[feature.index], + t.eq(feature.id, features[feature.index].id, "onSelect called with proper feature (" + feature.index + ")"); t.eq(feature.tested, feature.test, "onSelect called only once for feature (" + feature.index + ")"); @@ -90,7 +91,7 @@ // test that onUnselect gets called properly control.onUnselect = function(feature) { feature.tested += 1; - t.eq(feature, features[feature.index], + t.eq(feature.id, features[feature.index].id, "onUnselect called with proper feature (" + feature.index + ")"); t.eq(feature.tested, feature.test, "onUnselect called only once for feature (" + feature.index + ")");