Index: /CKTester/runners/yuitest/extension.js
===================================================================
--- /CKTester/runners/yuitest/extension.js	(revision 4147)
+++ /CKTester/runners/yuitest/extension.js	(revision 4148)
@@ -3,4 +3,69 @@
 For licensing, see LICENSE.html or http://ckeditor.com/license
 */
+
+
+// Extend YUI Lang to support function interception.
+YAHOO.lang.intercept = function( originalFunction, functionBuilder )
+{
+	return functionBuilder( originalFunction );
+};
+
+// Extend YUI TestRunner to support 'wait'/'resume' in during 'setUp' of TestSuite/TestCase.
+( function()
+{
+	function getWaitInterceptor( continuation )
+	{
+		return function ( original )
+		{
+			var fn = continuation;
+			return function()
+			{
+				var orgFn = original;
+				try
+				{
+					orgFn.apply( this, arguments );
+				}catch( thrown )
+				{
+					if ( thrown instanceof YAHOO.tool.TestCase.Wait )
+					{
+						this.continuation = fn;
+					}
+					else
+						throw thrown;
+				}
+			};
+		}
+	}
+
+	var runner = YAHOO.tool.TestRunner;
+
+	// Borrow 'wait' from YAHOO.tool.TestCase.
+	YAHOO.lang.augment( YAHOO.tool.TestSuite, YAHOO.tool.TestCase, 'wait' );
+
+	// Resume the continuation of setUp on 'resumeSetup()'.
+	YAHOO.tool.TestSuite.prototype.resumeSetup = YAHOO.tool.TestCase.prototype.resumeSetup =
+	function( )
+	{
+		runner.continuation.call( runner );
+		delete runner.continuation;
+	};
+
+	// Pause the test suite setup on any wait() and it's enough to continue by re-calling '_run'.
+	runner._run = YAHOO.lang.intercept( runner._run , getWaitInterceptor( function()
+	{
+		runner._run();
+	} ) );
+
+	// Pause the test case setup on any wait(), and continue with '_resumeTest( testFragment )'.
+	runner._runTest = YAHOO.lang.intercept( runner._runTest , getWaitInterceptor( function()
+	{
+		var node = this._cur,
+			testName /*:String*/ = node.testObject,
+			testCase /*:YAHOO.tool.TestCase*/ = node.parent.testObject,
+			test /*:Function*/ = testCase[testName];
+
+		this._resumeTest( test );
+	} ) );
+} )();
 
 // Extending YUI TestCase functionality.
