Different browsers de-innerHTMLize differently. Just look for the words.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@1548 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2006-10-03 18:55:05 +00:00
parent 7280a6211e
commit 964f777e64

View File

@@ -98,10 +98,10 @@
map.addControl(control);
control2 = new OpenLayers.Control.LayerSwitcher({'ascending':false});
map.addControl(control2);
t.eq(control.div.childNodes[1].childNodes[0].innerHTML, "<u>Base Layer</u>", "Base Layers first in LayerSwitcher with ascending true");
t.eq(control.div.childNodes[1].childNodes[2].innerHTML, "<u>Overlays</u>", "Overlays in LayerSwitcher with ascending true");
t.eq(control2.div.childNodes[1].childNodes[2].innerHTML, "<u>Base Layer</u>", "Base Layers last in LayerSwitcher with ascending false");
t.eq(control2.div.childNodes[1].childNodes[0].innerHTML, "<u>Overlays</u>", "Base Layers last in LayerSwitcher with ascending false");
t.ok(control.div.childNodes[1].childNodes[0].innerHTML.match("Base Layer"), "Base Layers first in LayerSwitcher with ascending true");
t.ok(control.div.childNodes[1].childNodes[2].innerHTML.match("Overlays"), "Overlays in LayerSwitcher with ascending true");
t.ok(control2.div.childNodes[1].childNodes[2].innerHTML.match("Base Layer"), "Base Layers last in LayerSwitcher with ascending false");
t.ok(control2.div.childNodes[1].childNodes[0].innerHTML.match("Overlays"), "Base Layers last in LayerSwitcher with ascending false");
}