From 7cb99834e37fba9512919d5494cf52a17c9a12dc Mon Sep 17 00:00:00 2001 From: Bart van den Eijnden Date: Tue, 23 Apr 2013 13:02:29 +0200 Subject: [PATCH] fix opacity tests in IE10 (see #948) --- tests/Popup.html | 3 +-- tests/Popup/AnchoredBubble.html | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/Popup.html b/tests/Popup.html index 766ac59e0d..d2a9685398 100644 --- a/tests/Popup.html +++ b/tests/Popup.html @@ -168,8 +168,7 @@ var bColor = popup.div.style.backgroundColor; var goodColor = ( (bColor == color) || (bColor == hexColor)); t.ok(goodColor, "good default popup.backgroundColor"); - - if (navigator.appName.indexOf("Microsoft") == -1) { + if (navigator.appName.indexOf("Microsoft") == -1 || new RegExp(/msie 10/).test(navigator.userAgent.toLowerCase())) { t.eq(parseFloat(popup.div.style.opacity), opacity, "good default popup.opacity"); } else { t.eq(popup.div.style.filter, "alpha(opacity=" + opacity*100 + ")", "good default popup.opacity"); diff --git a/tests/Popup/AnchoredBubble.html b/tests/Popup/AnchoredBubble.html index bd2d8123b2..f03ff09d8d 100644 --- a/tests/Popup/AnchoredBubble.html +++ b/tests/Popup/AnchoredBubble.html @@ -32,7 +32,7 @@ popup.setOpacity(opacity); popup.draw(new OpenLayers.Pixel(x, y)); - if (navigator.appName.indexOf("Microsoft") == -1) { + if (navigator.appName.indexOf("Microsoft") == -1 || new RegExp(/msie 10/).test(navigator.userAgent.toLowerCase())) { t.eq(parseFloat(popup.div.style.opacity), opacity, "good default popup.opacity"); } else { t.eq(popup.div.style.filter, "alpha(opacity=" + opacity*100 + ")", "good default popup.opacity"); @@ -43,7 +43,7 @@ t.ok(popup.groupDiv.parentNode.getElementsByTagName("span").length > 0, "popup.groupDiv.parentNode has SPAN children"); var ricoCornerDiv = popup.groupDiv.parentNode.getElementsByTagName("span")[0]; - if (navigator.appName.indexOf("Microsoft") == -1) { + if (navigator.appName.indexOf("Microsoft") == -1 || new RegExp(/msie 10/).test(navigator.userAgent.toLowerCase())) { t.eq(parseFloat(ricoCornerDiv.style.opacity), opacity, "good default ricoCornerDiv.opacity"); } else { t.eq(ricoCornerDiv.style.filter, "alpha(opacity=" + opacity*100 + ")", "good default ricoCornerDiv.opacity");