Ticket #2570: 2570.patch
File 2570.patch, 2.1 KB (added by , 15 years ago) |
---|
-
_source/tests/plugins/selection/selection.html
2 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 3 <head> 4 4 <title>Plugin: selection</title> 5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" >5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 6 6 <link rel="stylesheet" type="text/css" href="../../test.css" /> 7 7 <script type="text/javascript" src="../../../../ckeditor_source.js"></script> 8 8 <script type="text/javascript" src="../../test.js"></script> … … 36 36 assert.areSame( 0, $range.compareEndPoints( 'EndToEnd', $range2 ), 'EndToEnd' ); 37 37 }, 38 38 39 test_selection_image : function() 40 { 41 var element = doc.getById( 'testZone' ); 42 element.setHtml( '<p>A normal image <img src="../../_assets/regular_smile.gif" id="testImage"> inside the text<\/p>' ); 43 var image = doc.getById('testImage'); 44 45 doc.getSelection().selectElement(image); 46 var selectedElement = doc.getSelection().getSelectedElement() ; 47 // Opera doesn't return any selected element 48 assert.isNotNull( selectedElement, 'The image hasn\'t been selected' ); 49 assert.areSame( image.$, selectedElement.$, 'The image hasn\'t been selected correctly' ); 50 51 // Webkit has problems with the selection of floated images 52 image.setStyle('float', 'left'); 53 54 doc.getSelection().selectElement(image); 55 selectedElement = doc.getSelection().getSelectedElement() ; 56 assert.isNotNull( selectedElement, 'The floated image hasn\'t been selected' ); 57 assert.areSame( image.$, selectedElement.$, 'The floated image hasn\'t been selected correctly' ); 58 }, 59 39 60 name : document.title 40 61 }; 41 62 })()); … … 45 66 <body> 46 67 <p> 47 68 This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">CKEditor</a>.</p> 69 <p> </p> 70 <p> </p> 71 <div id="testZone"></div> 48 72 </body> 49 73 </html>