Index: /CKEditor/tests/dt/plugins/jquery/1.html
===================================================================
--- /CKEditor/tests/dt/plugins/jquery/1.html	(revision 4241)
+++ /CKEditor/tests/dt/plugins/jquery/1.html	(revision 4242)
@@ -7,18 +7,19 @@
 	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
 	<script type="text/javascript" src="http://malsup.com/jquery/form/jquery.form.js"></script>
+	<script type="text/javascript" src="../../../../../_source/plugins/jquery/plugin.js"></script>
 	<script type="text/javascript">
 	//<![CDATA[
 
 // Load the required plugins and launch the runner.
-var runner = YAHOO.tool.TestRunner;
-runner.defer = true;
-
-$( window ).bind( 'load', function()
-{
-	CKEDITOR.plugins.load( 'jquery' , function()
-	{
-		runner.run();
-	} );
-} );
+// var runner = YAHOO.tool.TestRunner;
+// runner.defer = true;
+// 
+// $( window ).bind( 'load', function()
+// {
+// 	CKEDITOR.plugins.load( 'jquery' , function()
+// 	{
+// 		runner.run();
+// 	} );
+// } );
 
 CKEDITOR.test.addTestCase( ( function()
@@ -87,29 +88,5 @@
 		},
 
-		test_config_no_order : function()
-		{
-			var testSelf = this,
-				testFinished = false;
-			CKEDITOR.config.test_config_no_order = false;
-			jQuery('textarea#config_no_order').ckeditor(
-				function( textarea )
-				{
-					var editor = this;
-					testSelf.resume( function()
-					{
-						assert.isTrue( editor.config.test_config_no_order );
-						testFinished = true;
-						cleanup( 'config_no_order' );
-					});
-				},
-				{ test_config_no_order: true }
-			);
-			testSelf.wait(function(){
-				cleanup( 'config_no_order' );
-				assert.isTrue( testFinished, 'Test not finished.' );
-			}, testTimeout);
-		},
-
-		test_val_get_with_timeout : function()
+		test_val_get : function()
 		{
 			var testSelf = this,
@@ -119,7 +96,6 @@
 				var editor = this;
 				editor.dataProcessor.writer._.rules = {};
-				editor.setData( 'foo bar' );
-
-				setTimeout(function()
+
+				$( textarea ).one( 'setData.ckeditor', function()
 				{
 					testSelf.resume( function()
@@ -129,5 +105,7 @@
 						cleanup( 'val_get_with_timeout' );
 					});
-				}, 1000);
+				});
+
+				editor.setData( 'foo bar' );
 			});
 			testSelf.wait( function() {
@@ -137,5 +115,5 @@
 		},
 
-		test_val_set_with_timeout : function()
+		test_val_set : function()
 		{
 			var testSelf = this,
@@ -145,6 +123,6 @@
 				var editor = this;
 				editor.dataProcessor.writer._.rules = {};
-				jQuery( textarea ).val( 'foo bar' );
-				setTimeout( function()
+
+				$( textarea ).one( 'setData.ckeditor', function()
 				{
 					testSelf.resume( function()
@@ -154,5 +132,7 @@
 						cleanup( 'val_set_with_timeout' );
 					});
-				}, 1000);
+				});
+
+				jQuery( textarea ).val( 'foo bar' );
 			});
 			testSelf.wait( function() {
@@ -170,6 +150,6 @@
 				var editor = this;
 				editor.dataProcessor.writer._.rules = {};
-				editor.setData( 'foo bar' );
-				setTimeout(function()
+
+				$( textarea ).one( 'setData.ckeditor', function()
 				{
 					testSelf.resume( function()
@@ -180,6 +160,7 @@
 						cleanup( 'ckeditor_get' );
 					});
-				// longer timeout may be needed
-				}, 1000);
+				});
+
+				editor.setData( 'foo bar' );
 			});
 			testSelf.wait( function() {
@@ -233,5 +214,5 @@
 					var editor = this;
 					editor.dataProcessor.writer._.rules = {};
-					editor.setData( 'foo bar' );
+
 					jQuery('#submit').submit( function()
 					{
@@ -245,8 +226,11 @@
 						return false;
 					});
-					setTimeout(function()
+
+					$( textarea ).one( 'setData.ckeditor', function()
 					{
 						jQuery( '#submit' ).submit();
-					}, 1000 );
+					});
+
+					editor.setData( 'foo bar' );
 				}
 			);
@@ -268,5 +252,4 @@
 					var editor = this;
 					editor.dataProcessor.writer._.rules = {};
-					editor.setData( 'foo bar' );
 
 					jQuery('#ajax_submit').ajaxForm(
@@ -276,4 +259,5 @@
 							testSelf.resume( function()
 							{
+								editor.dataProcessor.writer._.rules = {};
 								assert.areSame( '<p>foo bar</p>', editor.getData(), '1' );
 								assert.areSame( editor.getData(), formData[ 0 ][ 'value' ], '2' );
@@ -285,8 +269,10 @@
 					} );
 
-					setTimeout( function()
+					$( textarea ).one( 'setData.ckeditor', function()
 					{
 						jQuery('#ajax_submit').submit();
-					}, 1000 );
+					} );
+
+					editor.setData( 'foo bar' );
 				} );
 
@@ -318,41 +304,4 @@
 				assert.isTrue( testFinished, 'Test not finished.' );
 			}, testTimeout );
-		},
-
-		// This test causes error in Opera (9, 10) when combined with test_parallel_callbacks or test_serial_callbacks.
-		test_setData_event : function()
-		{
-			var testSelf = this,
-				testFinished = false;
-			jQuery( 'textarea#setData_event' )
-				.one( 'setData.ckeditor', function( event, editor, data )
-				{
-					// Alternative bind method.
-//						.bind( 'setData.ckeditor', function( event, editor, data )
-//						{
-//							jQuery( this ).unbind( 'setData.ckeditor', arguments.callee );
-					testSelf.resume( function()
-					{
-						assert.areSame( '<p>foo bar</p>', data );
-						assert.isTrue( editor instanceof CKEDITOR.editor, 'editor instanceof CKEDITOR.editor' );
-						testFinished =
-						true;
-						cleanup( 'setData_event' );
-					});
-				})
-				.ckeditor( function()
-				{
-					var editor = this;
-					editor.dataProcessor.writer._.rules = {};
-					// Delay it a bit.
-					setTimeout( function()
-					{
-						editor.setData('foo bar');
-					}, 300 );
-				});
-			testSelf.wait( function() {
-				cleanup( 'setData_event' );
-				assert.isTrue( testFinished, 'Test not finished.' );
-			}, testTimeout);
 		},
 
