Index: /CKEditor/tests/tt/4574/1.html
===================================================================
--- /CKEditor/tests/tt/4574/1.html	(revision 4423)
+++ /CKEditor/tests/tt/4574/1.html	(revision 4424)
@@ -4,5 +4,5 @@
 <head>
 	<title>Ticket: #4574 - Merge Cells</title>
-	<meta name="tags" content="editor,unit,drupal">
+	<meta name="tags" content="editor,unit,all">
 	<script type="text/javascript" src="../../cktester/cell.js"></script>
 	<script>
@@ -20,4 +20,8 @@
 	ts.add( tc = new YAHOO.tool.TestCase(
 		{
+			setUp : function()
+			{
+				ts.editor.focus();
+			},
 			/**
 			 * Test merge table cells.
@@ -26,5 +30,4 @@
 			{
 				var editor = ts.editor;
-				editor.focus();
 				test.setHtmlWithSelection(
 					editor.document.getBody(),
@@ -84,4 +87,37 @@
 				var result = editor.execCommand( 'cellMerge' );
 				assert.areEqual( test.getValueAsHtml( 'editor_data_output_4' ),
+						test.fixHtml( editor.getData(), false ), 'editor output data doesn\'t match.' );
+			},
+
+			/**
+			 * Empty cells should not cause unwanted line-breaks in none-IE.
+			 */
+			test_merge_table_cells_5 : function()
+			{
+				if( CKEDITOR.env.ie )
+					return;
+
+				var editor = ts.editor;
+				test.setHtmlWithSelection(
+					editor.document.getBody(),
+					test.getValueAsHtml( 'editor_data_with_selection_5' ) );
+
+				var result = editor.execCommand( 'cellMerge' );
+				assert.areEqual( test.getValueAsHtml( 'editor_data_output_5' ),
+						test.fixHtml( editor.getData(), false ), 'editor output data doesn\'t match.' );
+			},
+			
+			/**
+			 * Empty cell's tail br don't get duplicate during merge.
+			 */
+			test_merge_table_cells_6 : function()
+			{
+				var editor = ts.editor;
+				test.setHtmlWithSelection(
+					editor.document.getBody(),
+					test.getValueAsHtml( 'editor_data_with_selection_6' ) );
+
+				var result = editor.execCommand( 'cellMerge' );
+				assert.areEqual( test.getValueAsHtml( 'editor_data_output_6' ),
 						test.fixHtml( editor.getData(), false ), 'editor output data doesn\'t match.' );
 			}
@@ -231,4 +267,50 @@
 </table>
 </textarea>
+
+<textarea id="editor_data_with_selection_5">
+<table>
+    <tbody>
+        <tr>
+            <td rowspan="2">[<br _moz_dirty="" type="_moz"/></td>
+            <td colspan="2">cell2]</td>
+        </tr>
+    </tbody>
+</table>
+</textarea>
+<textarea id="editor_data_output_5">
+<table>
+	<tbody>
+		<tr>
+			<td>
+				cell2</td>
+		</tr>
+	</tbody>
+</table>
+</textarea>
+
+
+<textarea id="editor_data_with_selection_6">
+<table>
+    <tbody>
+        <tr>
+            <td rowspan="2">[cell1<br /></td>
+        </tr>
+        <tr>
+            <td colspan="2">cell2]</td>
+        </tr>
+    </tbody>
+</table>
+</textarea>
+<textarea id="editor_data_output_6">
+<table>
+	<tbody>
+		<tr>
+			<td>
+				cell1<br/>
+				cell2</td>
+		</tr>
+	</tbody>
+</table>
+</textarea>
 </body>
 </html>
