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 @@
A normal image 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 @@
This is some sample text. You are using CKEditor.
++
+