Fix tests for Safari 3. For some reason, you can set the style.overflow property but you have to read it as overflowX or overflowY.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5489 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -75,7 +75,9 @@
|
||||
t.eq(map.popups.length, 1, "Popup opened correctly");
|
||||
layer.markers[1].events.triggerEvent('click', event);
|
||||
t.eq(map.popups.length, 1, "1st popup gone, 2nd Popup opened correctly");
|
||||
t.eq(map.popups[0].contentDiv.style.overflow,"auto", "default Popup overflow correct");
|
||||
//Safari 3 separates style overflow into overflow-x and overflow-y
|
||||
var prop = (OpenLayers.Util.getBrowserName() == 'safari') ? 'overflowX' : 'overflow';
|
||||
t.eq(map.popups[0].contentDiv.style[prop],"auto", "default Popup overflow correct");
|
||||
});
|
||||
}
|
||||
function test_03_Layer_Text_overflow (t) {
|
||||
@@ -92,10 +94,14 @@
|
||||
t.delay_call( 1, function() {
|
||||
layer.markers[0].events.triggerEvent('click', event);
|
||||
t.eq(map.popups.length, 1, "Popup opened correctly");
|
||||
t.eq(map.popups[0].contentDiv.style.overflow,"auto", "Popup overflow read from file");
|
||||
//Safari 3 separates style overflow into overflow-x and overflow-y
|
||||
var prop = (OpenLayers.Util.getBrowserName() == 'safari') ? 'overflowX' : 'overflow';
|
||||
t.eq(map.popups[0].contentDiv.style[prop],"auto", "Popup overflow read from file");
|
||||
layer.markers[1].events.triggerEvent('click', event);
|
||||
t.eq(map.popups.length, 1, "1st popup gone, 2nd Popup opened correctly");
|
||||
t.eq(map.popups[0].contentDiv.style.overflow,"hidden", "Popup overflow read from file");
|
||||
//Safari 3 separates style overflow into overflow-x and overflow-y
|
||||
var prop = (OpenLayers.Util.getBrowserName() == 'safari') ? 'overflowX' : 'overflow';
|
||||
t.eq(map.popups[0].contentDiv.style[prop],"hidden", "Popup overflow read from file");
|
||||
});
|
||||
}
|
||||
function test_04_Layer_Text_events_nopopups (t) {
|
||||
|
||||
@@ -25,7 +25,9 @@
|
||||
t.ok( box instanceof OpenLayers.Marker.Box, "new OpenLayers.Marker.Box returns Box object" );
|
||||
t.ok( box.bounds.equals(bounds), "bounds object correctly set");
|
||||
t.ok( box.div != null, "div created");
|
||||
t.eq( box.div.style.overflow, "hidden", "div style overflow hidden");
|
||||
//Safari 3 separates style overflow into overflow-x and overflow-y
|
||||
var prop = (OpenLayers.Util.getBrowserName() == 'safari') ? 'overflowX' : 'overflow';
|
||||
t.eq( box.div.style[prop], "hidden", "div style overflow hidden");
|
||||
t.ok( box.events != null, "events object created");
|
||||
t.eq( g_Color, borderColor, "setBorder called with correct border color");
|
||||
t.eq( g_Width, borderWidth, "setBorder called with correct border width");
|
||||
|
||||
@@ -42,7 +42,9 @@
|
||||
|
||||
feature = new OpenLayers.Feature(layer, lonlat, data);
|
||||
popup = feature.createPopup();
|
||||
t.eq(popup.contentDiv.style.overflow, "auto", 'overflow on popup is correct');
|
||||
//Safari 3 separates style overflow into overflow-x and overflow-y
|
||||
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) {
|
||||
t.plan(1);
|
||||
|
||||
@@ -120,7 +120,9 @@
|
||||
t.eq(contentDiv.style.width, "500px", "correct content div width");
|
||||
t.eq(contentDiv.style.height, "400px", "correct content div height");
|
||||
t.eq(contentDiv.style.position, "relative", "correct content div position");
|
||||
t.eq(contentDiv.style.overflow, "hidden", "correct content div overflow");
|
||||
//Safari 3 separates style overflow into overflow-x and overflow-y
|
||||
var prop = (OpenLayers.Util.getBrowserName() == 'safari') ? 'overflowX' : 'overflow';
|
||||
t.eq(contentDiv.style[prop], "hidden", "correct content div overflow");
|
||||
t.eq(contentDiv.innerHTML, content, "correct content div content");
|
||||
|
||||
var bColor = popup.div.style.backgroundColor;
|
||||
|
||||
@@ -59,7 +59,9 @@
|
||||
|
||||
t.eq( div.style.position, position, "div.style.positionset correctly");
|
||||
t.ok( (div.style.border.indexOf(border) != -1), "div.style.border set correctly");
|
||||
t.eq( div.style.overflow, overflow, "div.style.overflow set correctly");
|
||||
//Safari 3 separates style overflow into overflow-x and overflow-y
|
||||
var prop = (OpenLayers.Util.getBrowserName() == 'safari') ? 'overflowX' : 'overflow';
|
||||
t.eq( div.style[prop], overflow, "div.style.overflow set correctly");
|
||||
t.eq( parseFloat(div.style.opacity), opacity, "element.style.opacity set correctly");
|
||||
var filterString = 'alpha(opacity=' + (opacity * 100) + ')';
|
||||
t.eq( div.style.filter, filterString, "element.style.filter set correctly");
|
||||
@@ -82,7 +84,9 @@
|
||||
|
||||
t.eq( div.style.position, "absolute", "div.style.positionset correctly");
|
||||
t.eq( div.style.border, "", "div.style.border set correctly");
|
||||
t.eq(div.style.overflow, "", "div.style.overflow set correctly");
|
||||
//Safari 3 separates style overflow into overflow-x and overflow-y
|
||||
var prop = (OpenLayers.Util.getBrowserName() == 'safari') ? 'overflowX' : 'overflow';
|
||||
t.eq(div.style[prop], "", "div.style.overflow set correctly");
|
||||
t.ok( !div.style.opacity, "element.style.opacity set correctly");
|
||||
t.ok( !div.style.filter, "element.style.filter set correctly");
|
||||
|
||||
@@ -342,7 +346,9 @@
|
||||
|
||||
t.eq( element.style.position, position, "element.style.position set correctly");
|
||||
t.ok( (element.style.border.indexOf(border) != -1), "element.style.border set correctly");
|
||||
t.eq( element.style.overflow, overflow, "element.style.overflow set correctly");
|
||||
//Safari 3 separates style overflow into overflow-x and overflow-y
|
||||
var prop = (OpenLayers.Util.getBrowserName() == 'safari') ? 'overflowX' : 'overflow';
|
||||
t.eq( element.style[prop], overflow, "element.style.overflow set correctly");
|
||||
t.eq( parseFloat(element.style.opacity), opacity, "element.style.opacity set correctly");
|
||||
var filterString = 'alpha(opacity=' + (opacity * 100) + ')';
|
||||
t.eq( element.style.filter, filterString, "element.style.filter set correctly");
|
||||
|
||||
Reference in New Issue
Block a user