Index: /CKEditor/tests/tt/4574/3.html
===================================================================
--- /CKEditor/tests/tt/4574/3.html	(revision 4428)
+++ /CKEditor/tests/tt/4574/3.html	(revision 4428)
@@ -0,0 +1,114 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+	"http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+	<title>Ticket: #4574 - Merge Cell with Direction</title>
+	<meta name="tags" content="editor,unit,drupal">
+	<script type="text/javascript" src="../../cktester/cell.js"></script>
+	<script>
+( function()
+{
+	var ts, tc,
+			assert = CKEDITOR.test.assert,
+			test = CKEDITOR.test;
+	YAHOO.tool.TestRunner.add( ts = new CKEDITOR.test.suites.editorTestSuite(
+		{
+				editorName : 'test_editor',
+				name :document.title
+		} ) );
+
+	ts.add( tc = new YAHOO.tool.TestCase(
+		{
+			/**
+			 * Merge with the right cell.
+			 */
+			test_merge_table_cell_right : function()
+			{
+				var editor = ts.editor;
+				editor.focus();
+				test.setHtmlWithSelection(
+					editor.document.getBody(),
+					test.getValueAsHtml( 'editor_data_with_selection' ) );
+
+				editor.execCommand( 'cellMergeRight' );
+				assert.areEqual( test.getValueAsHtml( 'editor_data_output' ),
+						test.fixHtml( editor.getData(), false ), 'editor output data doesn\'t match.' );
+			},
+
+			/**
+			 * Merge with the below cell.
+			 */
+			test_merge_table_cell_right_2 : function()
+			{
+				var editor = ts.editor;
+				editor.focus();
+				test.setHtmlWithSelection(
+					editor.document.getBody(),
+					test.getValueAsHtml( 'editor_data_with_selection_2' ) );
+
+				editor.execCommand( 'cellMergeDown' );
+				assert.areEqual( test.getValueAsHtml( 'editor_data_output_2' ),
+						test.fixHtml( editor.getData(), false ), 'editor output data doesn\'t match.' );
+			}
+
+		} ) );
+} )();
+	</script>
+</head>
+<body>
+<textarea id="editor_data_with_selection">
+<table>
+    <tbody>
+        <tr>
+            <td>^cell1</td>
+            <td>cell2</td>
+        </tr>
+        <tr>
+            <td colspan="2">cell3</td>
+        </tr>
+    </tbody>
+</table>
+</textarea>
+<textarea id="editor_data_output">
+<table>
+	<tbody>
+		<tr>
+			<td colspan="2">
+				cell1cell2</td>
+		</tr>
+		<tr>
+			<td colspan="2">
+				cell3</td>
+		</tr>
+	</tbody>
+</table>
+</textarea>
+
+<textarea id="editor_data_with_selection_2">
+<table>
+    <tbody>
+        <tr>
+            <td>^cell1</td>
+            <td rowspan="2">cell2</td>
+        </tr>
+        <tr>
+            <td>cell3</td>
+        </tr>
+    </tbody>
+</table>
+</textarea>
+<textarea id="editor_data_output_2">
+<table>
+	<tbody>
+		<tr>
+			<td rowspan="2">
+				cell1<br/>
+				cell3</td>
+			<td rowspan="2">
+				cell2</td>
+		</tr>
+	</tbody>
+</table>
+</textarea>
+</body>
+</html>
