Index: _source/tests/plugins/selection/selection.html
===================================================================
--- _source/tests/plugins/selection/selection.html	(revision 3571)
+++ _source/tests/plugins/selection/selection.html	(working copy)
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 	<title>Plugin: selection</title>
-	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 	<link rel="stylesheet" type="text/css" href="../../test.css" />
 	<script type="text/javascript" src="../../../../ckeditor_source.js"></script>
 	<script type="text/javascript" src="../../test.js"></script>
@@ -36,6 +36,27 @@
 			assert.areSame( 0, $range.compareEndPoints( 'EndToEnd', $range2 ), 'EndToEnd' );
 		},
 
+		test_selection_image : function()
+		{
+			var element = doc.getById( 'testZone' );
+			element.setHtml( '<p>A normal image <img src="../../_assets/regular_smile.gif" id="testImage"> inside the text<\/p>' );
+			var image = doc.getById('testImage');
+
+			doc.getSelection().selectElement(image);
+			var selectedElement = doc.getSelection().getSelectedElement() ;
+			// Opera doesn't return any selected element
+			assert.isNotNull( selectedElement, 'The image hasn\'t been selected' );
+			assert.areSame( image.$, selectedElement.$, 'The image hasn\'t been selected correctly' );
+			
+			// Webkit has problems with the selection of floated images
+			image.setStyle('float', 'left');
+
+			doc.getSelection().selectElement(image);
+			selectedElement = doc.getSelection().getSelectedElement() ;
+			assert.isNotNull( selectedElement, 'The floated image hasn\'t been selected' );
+			assert.areSame( image.$, selectedElement.$, 'The floated image hasn\'t been selected correctly' );
+		},
+
 		name : document.title
 	};
 })());
@@ -45,5 +66,8 @@
 <body>
 	<p>
 		This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">CKEditor</a>.</p>
+		<p>&nbsp;</p>
+		<p>&nbsp;</p>
+	<div id="testZone"></div>
 </body>
 </html>
