Fixing IFrame test for IE9 (see #277).
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
var isMozilla = (navigator.userAgent.indexOf("compatible") == -1);
|
var isMozilla = (navigator.userAgent.indexOf("compatible") == -1);
|
||||||
var isOpera = (navigator.userAgent.indexOf("Opera") != -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 map, layer;
|
||||||
var position = new OpenLayers.Pixel(20,30);
|
var position = new OpenLayers.Pixel(20,30);
|
||||||
@@ -99,14 +99,14 @@
|
|||||||
tile._blankImageUrl),
|
tile._blankImageUrl),
|
||||||
"backgroundImage of eventPane is set.");
|
"backgroundImage of eventPane is set.");
|
||||||
t.eq(parseInt(eventPane.style.zIndex, 10), 1, "zIndex 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.ok(iFrame != null, "IFrame successfully created.");
|
||||||
t.eq(iFrame.style.backgroundColor, '#ffffff', "backgroundColor correctly set.");
|
t.eq(iFrame.style.backgroundColor, '#ffffff', "backgroundColor correctly set.");
|
||||||
t.eq(iFrame.style.filter, 'chroma(color=#FFFFFF)', "filter correctly set.");
|
t.eq(iFrame.style.filter, 'chroma(color=#FFFFFF)', "filter correctly set.");
|
||||||
} else {
|
} else {
|
||||||
t.ok(iFrame instanceof HTMLElement, "IFrame successfully created.");
|
t.ok(iFrame instanceof HTMLElement, "IFrame successfully created.");
|
||||||
t.ok(true, 'Skip IFrame backgroundColor test outside IE');
|
t.ok(true, 'Skip IFrame backgroundColor test outside IE < 9');
|
||||||
t.ok(true, 'Skip IFrame filter test outside IE');
|
t.ok(true, 'Skip IFrame filter test outside IE < 9');
|
||||||
}
|
}
|
||||||
t.eq( iFrame.scrolling, 'no', "no scrolling");
|
t.eq( iFrame.scrolling, 'no', "no scrolling");
|
||||||
t.eq( parseFloat(iFrame.marginWidth), 0, "no margin width");
|
t.eq( parseFloat(iFrame.marginWidth), 0, "no margin width");
|
||||||
|
|||||||
Reference in New Issue
Block a user