Fixing IFrame test for IE9 (see #277).

This commit is contained in:
ahocevar
2012-03-05 11:49:07 +01:00
parent d3a4275136
commit 5674d440c8

View File

@@ -7,7 +7,7 @@
var isMozilla = (navigator.userAgent.indexOf("compatible") == -1);
var isOpera = (navigator.userAgent.indexOf("Opera") != -1);
var isIE = (navigator.userAgent.indexOf("MSIE") != -1);
var isIElt9 = (parseFloat(navigator.appVersion.split("MSIE")[1]) < 9);
var map, layer;
var position = new OpenLayers.Pixel(20,30);
@@ -99,14 +99,14 @@
tile._blankImageUrl),
"backgroundImage of eventPane is set.");
t.eq(parseInt(eventPane.style.zIndex, 10), 1, "zIndex of eventPane is set.");
if(isIE) {
if(isIElt9) {
t.ok(iFrame != null, "IFrame successfully created.");
t.eq(iFrame.style.backgroundColor, '#ffffff', "backgroundColor correctly set.");
t.eq(iFrame.style.filter, 'chroma(color=#FFFFFF)', "filter correctly set.");
} else {
t.ok(iFrame instanceof HTMLElement, "IFrame successfully created.");
t.ok(true, 'Skip IFrame backgroundColor test outside IE');
t.ok(true, 'Skip IFrame filter test outside IE');
t.ok(true, 'Skip IFrame backgroundColor test outside IE < 9');
t.ok(true, 'Skip IFrame filter test outside IE < 9');
}
t.eq( iFrame.scrolling, 'no', "no scrolling");
t.eq( parseFloat(iFrame.marginWidth), 0, "no margin width");