Index: /CKEditor/tests/tt/7020/1.html
===================================================================
--- /CKEditor/tests/tt/7020/1.html	(revision 7100)
+++ /CKEditor/tests/tt/7020/1.html	(revision 7100)
@@ -0,0 +1,111 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+	"http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+	<title>Ticket: #7020 - Applying direction to certian table selection</title>
+	<meta name="tags" content="editor,unit,all,stable">
+	<script type="text/javascript" src="../../cktester/cell.js"></script>
+	<script>
+( function()
+{
+	var ts, tc, assert = CKEDITOR.test.assert, test = CKEDITOR.test, selector = YAHOO.util.Selector;
+
+	YAHOO.tool.TestRunner.add( ts = new CKEDITOR.test.suites.editorTestSuite(
+		{
+				editorName : 'test_editor_1',
+				enterMode : CKEDITOR.ENTER_BR,
+				name :document.title
+		} ) );
+
+	ts.add( tc = new YAHOO.tool.TestCase(
+		{
+			setUp : function ()
+			{
+				// Force result data un-formatted.
+				ts.editor.dataProcessor.writer._.rules = {};
+				ts.editor.focus();
+
+			},
+
+			
+			test_set_rtl: function()
+			{
+				var editor = ts.editor,
+				
+					contentWithSelection = test.getValueAsHtml( 'input' ),
+					output = '<table border="1"><tbody><tr><td dir="rtl">aa</td><td dir="rtl">bb</td></tr><tr><td dir="rtl">cc</td><td dir="rtl">dd</td></tr></tbody></table><p>&nbsp;</p>';
+				
+				test.setHtmlWithSelection( editor.document.getBody(), contentWithSelection );
+				
+				editor.execCommand( 'bidirtl' );
+				
+				this.wait( function ()
+				{
+					
+					assert.areSame( output, editor.getData() );
+					
+				}, 100 );
+			},
+			
+			test_set_ltr: function()
+			{
+				var editor = ts.editor,
+				
+					contentWithSelection = test.getValueAsHtml( 'input_2' ),
+					output = '<table border="1" dir="rtl"><tbody><tr><td>aa</td><td dir="ltr">bb</td></tr><tr><td dir="ltr">cc</td><td dir="ltr">dd</td></tr></tbody></table><p>&nbsp;</p>';
+				
+				test.setHtmlWithSelection( editor.document.getBody(), contentWithSelection );
+				
+				editor.execCommand( 'bidiltr' );
+				
+				this.wait( function ()
+				{
+					
+					assert.areSame( output, editor.getData() );
+					
+				}, 100 );
+			}
+		} ) );
+} )();
+	</script>
+</head>
+<body><textarea id='input'>
+<table border="1">
+	<tbody>
+		<tr>
+			<td>
+				aa[</td>
+			<td>
+				bb</td>
+		</tr>
+		<tr>
+			<td>
+				cc</td>
+			<td>
+				dd]</td>
+		</tr>
+	</tbody>
+</table>
+</textarea>
+<textarea id='input_2'>
+<table border="1" dir="rtl">
+	<tbody>
+		<tr>
+			<td>
+				aa</td>
+			<td>
+				[bb</td>
+		</tr>
+		<tr>
+			<td>
+				cc</td>
+			<td>
+				dd]</td>
+		</tr>
+	</tbody>
+</table>
+</textarea>
+
+
+</body>
+</html>
