From 587650e01b7b8f72a22c585cc2f654de7a726ee3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Sat, 31 Dec 2011 14:09:24 +0100 Subject: [PATCH] use parseFloat to read opacity style values in tests --- tests/Tile/Image.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/Tile/Image.html b/tests/Tile/Image.html index d40849fc9a..18e0be38dc 100644 --- a/tests/Tile/Image.html +++ b/tests/Tile/Image.html @@ -373,7 +373,7 @@ tile.onImageLoad(); t.eq(tile.imgDiv.style.visibility, 'inherit', '[a] onImageLoad makes the image visible'); - t.eq(tile.imgDiv.style.opacity, '0.5', + t.eq(parseFloat(tile.imgDiv.style.opacity), 0.5, '[a] onImageLoad sets the expected opacity for the image'); t.eq(log, 0, '[a] onImageLoad does not trigger loadend'); @@ -387,7 +387,7 @@ tile.onImageLoad(); t.eq(tile.imgDiv.style.visibility, 'inherit', '[b] onImageLoad makes the image visible'); - t.eq(tile.imgDiv.style.opacity, '0.5', + t.eq(parseFloat(tile.imgDiv.style.opacity), 0.5, '[b] onImageLoad sets the expected opacity for the image'); t.eq(log, 1, '[b] onImageLoad does trigger loadend'); @@ -401,7 +401,7 @@ tile.onImageLoad(); t.eq(tile.imgDiv.style.visibility, 'inherit', '[c] onImageLoad makes the image visible'); - t.eq(tile.imgDiv.style.opacity, '0.5', + t.eq(parseFloat(tile.imgDiv.style.opacity), 0.5, '[c] onImageLoad sets the expected opacity for the image'); t.eq(log, 1, '[c] onImageLoad does trigger loadend');