Index: /CKEditor/tests/dt/plugins/bidi/dir_changed_event.html
===================================================================
--- /CKEditor/tests/dt/plugins/bidi/dir_changed_event.html	(revision 6474)
+++ /CKEditor/tests/dt/plugins/bidi/dir_changed_event.html	(revision 6474)
@@ -0,0 +1,100 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+	<title>Plugin: BIDI</title>
+	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+	<meta name="tags" content="editor,unit,stable">
+	<script type="text/javascript" src="../../../cktester/cell.js"></script>
+	<script type="text/javascript">
+		CKEDITOR.test.runner.defer = true;
+		function run() { CKEDITOR.plugins.load( [ 'bidi' ], function() {
+			CKEDITOR.test.addTestCase( (function()
+			{
+				// Local references.
+				var assert = CKEDITOR.test.assert,
+					arrayAssert = YAHOO.util.ArrayAssert,
+					doc = new CKEDITOR.dom.document( document ),
+					innerDoc = new CKEDITOR.dom.document( doc.getById ( 'contents' ).$.contentDocument );
+
+				/*
+				 * Test "dirChanged" event fired properly when element text direction is manipulated through the DOM api.
+				 */
+				return {
+
+					test_dirChanged_event : function()
+					{
+						var target = innerDoc.getById( 'p1' ), changed;
+						innerDoc.on( 'dirChanged', function( evt )
+						{
+							changed = true;
+						});
+						target.setAttribute( 'dir', 'ltr');
+						assert.isTrue( changed );
+					},
+
+					test_dirChanged_event_2 : function()
+					{
+						var target = innerDoc.getById( 'p2' ), changed;
+						innerDoc.on( 'dirChanged', function( evt )
+						{
+							changed = true;
+						});
+						target.removeAttribute( 'dir' );
+						assert.isTrue( changed );
+					},
+
+					test_dirChanged_event_3 : function()
+					{
+						var target = innerDoc.getById( 'p3' ), changed;
+						innerDoc.on( 'dirChanged', function( evt )
+						{
+							changed = true;
+						});
+						target.setAttribute( 'style', 'direction:rtl;' );
+						assert.isTrue( changed );
+					},
+
+					test_dirChanged_event_4 : function()
+					{
+						var target = innerDoc.getById( 'p4' ), changed;
+						innerDoc.on( 'dirChanged', function( evt )
+						{
+							changed = true;
+						});
+						target.removeAttribute( 'style' );
+						assert.isTrue( changed );
+					},
+
+					test_dirChanged_event_5 : function()
+					{
+						var target = innerDoc.getById( 'p5' ), changed;
+						innerDoc.on( 'dirChanged', function( evt )
+						{
+							changed = true;
+						});
+						target.setStyle( 'direction', 'rtl' );
+						assert.isTrue( changed );
+					},
+
+					test_dirChanged_event_6 : function()
+					{
+						var target = innerDoc.getById( 'p6' ), changed;
+						innerDoc.on( 'dirChanged', function( evt )
+						{
+							changed = true;
+						});
+						target.removeStyle( 'direction', 'rtl' );
+						assert.isTrue( changed );
+					},
+
+					name : document.title
+				};
+			})() );
+			CKEDITOR.test.runner.run(); } );
+		}
+	</script>
+</head>
+<body>
+<iframe id="contents" src="dir_changed_inner.html" onload="run()"></iframe>
+</body>
+</html>
Index: /CKEditor/tests/dt/plugins/bidi/dir_changed_inner.html
===================================================================
--- /CKEditor/tests/dt/plugins/bidi/dir_changed_inner.html	(revision 6474)
+++ /CKEditor/tests/dt/plugins/bidi/dir_changed_inner.html	(revision 6474)
@@ -0,0 +1,27 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+		"http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+	<title></title>
+</head>
+<body>
+<div dir="rtl">
+	<p id="p1"></p>
+</div>
+<div>
+	<p id="p2" dir="rtl"></p>
+</div>
+<div>
+	<p id="p3"></p>
+</div>
+<div>
+	<p id="p4" style="direction:rtl"></p>
+</div>
+<div>
+	<p id="p5" style="direction:ltr"></p>
+</div>
+<div dir="rtl">
+	<p id="p6" style="direction:ltr"></p>
+</div>
+</body>
+</html>
