Index: /CKEditor/tests/dt/core/bootstrap.html
===================================================================
--- /CKEditor/tests/dt/core/bootstrap.html	(revision 4127)
+++ /CKEditor/tests/dt/core/bootstrap.html	(revision 4128)
@@ -1,7 +1,7 @@
-﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!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>CKEDITOR.bootstrap</title>
-	<meta name="tags" content="editor,unit,stable">
+	<meta name="tags" content="editor,unit,stable,editor-ondemand">
 	<script type="text/javascript" src="../../cktester/cell.js"></script>
 	<script type="text/javascript">
Index: /CKEditor/tests/dt/core/plugins.html
===================================================================
--- /CKEditor/tests/dt/core/plugins.html	(revision 4127)
+++ /CKEditor/tests/dt/core/plugins.html	(revision 4128)
@@ -21,5 +21,5 @@
 		{
 			CKEDITOR.plugins.addExternal( 'myplugin',
-			CKTester.cell.getAbsolutePath( 'plugins/myplugins/sample/' ), 'my_plugin.js' );
+			CKTESTER.cell.getAbsolutePath( 'plugins/myplugins/sample/' ), 'my_plugin.js' );
 
 			CKEDITOR.plugins.load( 'myplugin', function(){
Index: /CKEditor/tests/profile.js
===================================================================
--- /CKEditor/tests/profile.js	(revision 4127)
+++ /CKEditor/tests/profile.js	(revision 4128)
@@ -4,5 +4,5 @@
 */
 
-CKTester.fort.getProfile = function ()
+CKTESTER.fort.getProfile = function ()
 {
 	// Note : All paths specified below should refer to CKTester project root are generated automatically by fort tool. 
@@ -10,38 +10,43 @@
 		cells : 
 [
-	[ 'dt/core/ajax',[ 'editor','unit','stable' ]  ],
-	[ 'dt/core/bootstrap',[ 'editor','unit','stable' ]  ],
-	[ 'dt/core/ckeditor',[ 'editor','unit','stable' ]  ],
-	[ 'dt/core/dom/document',[ 'editor','unit','stable' ]  ],
-	[ 'dt/core/dom/documentfragment',[ 'editor','unit','stable' ]  ],
-	[ 'dt/core/dom/element',[ 'editor','unit','stable' ]  ],
-	[ 'dt/core/dom/node',[ 'editor','unit','stable' ]  ],
-	[ 'dt/core/dom/range',[ 'editor','unit','stable' ]  ],
-	[ 'dt/core/dom/text',[ 'editor','unit','stable' ]  ],
-	[ 'dt/core/dom/walker',[ 'editor','unit','stable' ]  ],
-	[ 'dt/core/dom/window',[ 'editor','unit','stable' ]  ],
-	[ 'dt/core/editor',[ 'editor','unit','stable' ]  ],
-	[ 'dt/core/env',[ 'editor','unit','stable' ]  ],
-	[ 'dt/core/event',[ 'editor','unit','stable' ]  ],
-	[ 'dt/core/htmlparser/fragment',[ 'editor','unit','stable' ]  ],
-	[ 'dt/core/htmlparser/htmlparser',[ 'editor','unit','stable' ]  ],
-	[ 'dt/core/plugins',[ 'editor','unit','stable' ]  ],
-	[ 'dt/core/scriptloader',[ 'editor','unit','stable' ]  ],
-	[ 'dt/core/tools',[ 'editor','unit','stable' ]  ],
-	[ 'dt/core/xml',[ 'editor','unit','stable' ]  ],
-	[ 'dt/plugins/domiterator/domiterator',[ 'editor','unit','stable' ]  ],
-	[ 'dt/plugins/htmldataprocessor/htmldataprocessor',[ 'editor','unit','stable' ]  ],
-	[ 'dt/plugins/jquery/jquery',[ 'editor','unit','jquery' ]  ],
-	[ 'dt/plugins/link/link',[ 'editor','unit','stable' ]  ],
-	[ 'dt/plugins/list/list',[ 'editor','unit','stable' ]  ],
-	[ 'dt/plugins/selection/selection',[ 'editor','unit','stable' ]  ],
-	[ 'dt/plugins/styles/styles',[ 'editor','unit','stable' ]  ],
-	[ 'tt/3009/3009',[ 'editor','unit','all' ]  ],
-	[ 'tt/3978/3978',[ 'editor','unit','all' ]  ],
-	[ 'tt/4048/4048',[ 'editor','unit','all' ]  ],
-	[ 'tt/4219/4219',[ 'editor','unit','all' ]  ],
-	[ 'tt/4227/4227',[ 'editor','unit','all' ]  ]
+	[ 'dt/core/ajax',[ 'editor','unit','stable' ] ],
+	[ 'dt/core/bootstrap',[ 'editor','unit','stable','editor-ondemand' ] ],
+	[ 'dt/core/ckeditor',[ 'editor','unit','stable' ] ],
+	[ 'dt/core/dom/document',[ 'editor','unit','stable' ] ],
+	[ 'dt/core/dom/documentfragment',[ 'editor','unit','stable' ] ],
+	[ 'dt/core/dom/element',[ 'editor','unit','stable' ] ],
+	[ 'dt/core/dom/node',[ 'editor','unit','stable' ] ],
+	[ 'dt/core/dom/range',[ 'editor','unit','stable' ] ],
+	[ 'dt/core/dom/text',[ 'editor','unit','stable' ] ],
+	[ 'dt/core/dom/walker',[ 'editor','unit','stable' ] ],
+	[ 'dt/core/dom/window',[ 'editor','unit','stable' ] ],
+	[ 'dt/core/editor',[ 'editor','unit','stable' ] ],
+	[ 'dt/core/env',[ 'editor','unit','stable' ] ],
+	[ 'dt/core/event',[ 'editor','unit','stable' ] ],
+	[ 'dt/core/htmlparser/fragment',[ 'editor','unit','stable' ] ],
+	[ 'dt/core/htmlparser/htmlparser',[ 'editor','unit','stable' ] ],
+	[ 'dt/core/plugins',[ 'editor','unit','stable' ] ],
+	[ 'dt/core/scriptloader',[ 'editor','unit','stable' ] ],
+	[ 'dt/core/test',[ 'editor','unit','all' ] ],
+	[ 'dt/core/tools',[ 'editor','unit','stable' ] ],
+	[ 'dt/core/xml',[ 'editor','unit','stable' ] ],
+	[ 'dt/plugins/domiterator/domiterator',[ 'editor','unit','stable' ] ],
+	[ 'dt/plugins/htmldataprocessor/htmldataprocessor',[ 'editor','unit','stable' ] ],
+	[ 'dt/plugins/jquery/jquery',[ 'editor','unit','jquery' ] ],
+	[ 'dt/plugins/link/link',[ 'editor','unit','stable' ] ],
+	[ 'dt/plugins/list/list',[ 'editor','unit','stable' ] ],
+	[ 'dt/plugins/selection/selection',[ 'editor','unit','stable' ] ],
+	[ 'dt/plugins/styles/styles',[ 'editor','unit','stable' ] ],
+	[ 'tt/3009/3009',[ 'editor','unit','all' ] ],
+	[ 'tt/3978/3978',[ 'editor','unit','all' ] ],
+	[ 'tt/4048/4048',[ 'editor','unit','all' ] ],
+	[ 'tt/4208/4208',[ 'editor','unit','all' ] ],
+	[ 'tt/4219/4219',[ 'editor','unit','all' ] ],
+	[ 'tt/4227/4227',[ 'editor','unit','all' ] ],
+	[ 'tt/4237/4237',[ 'editor','unit','all' ] ],
+	[ 'tt/4240/4240',[ 'editor','unit','all' ] ],
+	[ 'tt/4241/4241',[ 'editor','unit','all' ] ],
+	[ 'tt/4242/4242',[ 'editor','unit','all' ] ]
 ],
-
 		cellResolvers :
 		[
Index: /CKEditor/tests/profile.js.tpl
===================================================================
--- /CKEditor/tests/profile.js.tpl	(revision 4128)
+++ /CKEditor/tests/profile.js.tpl	(revision 4128)
@@ -0,0 +1,36 @@
+/*
+Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKTESTER.fort.getProfile = function ()
+{
+	// Note : All paths specified below should refer to CKTester project root are generated automatically by fort tool. 
+	return {
+		cells : ${cells},
+		cellResolvers :
+		[
+			function( cell )
+			{
+				var tags = cell.tags, env = cell.environment;
+
+				// Inject CKEditor source.
+				if( ( tags.indexOf( 'editor' ) != -1 )
+					&& ( tags.indexOf( 'editor-ondemand' ) == -1  ) )
+					env.push( '${CKEDITOR_ROOT}/ckeditor_source.js' );
+				else if ( tags.indexOf( 'editor-ondemand' ) )
+					env.push( '${CKEDITOR_ROOT}/ckeditor_basic_source.js' );
+
+				// Inject CKEditor unit test library.
+				if ( tags.indexOf( 'unit' ) != -1  )
+					env.push( '${CKEDITOR_ROOT}/_source/core/test.js' );
+
+				if ( tags.indexOf( 'jquery' ) != -1  )
+					env.push( 'http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js' );
+
+				if ( tags.indexOf( 'jquery-form' ) != -1  )
+					env.push( 'http://malsup.com/jquery/form/jquery.form.js' );
+			}
+		]
+	};
+};
Index: /CKEditor/tests/tt/4237/4237.html
===================================================================
--- /CKEditor/tests/tt/4237/4237.html	(revision 4127)
+++ /CKEditor/tests/tt/4237/4237.html	(revision 4128)
@@ -9,5 +9,5 @@
 	<script type="text/javascript">
 CKEDITOR.config.width='400';
-CKEDITOR.config.customConfig = CKTester.cell.getAbsolutePath( '_asset/custom-config.js' );
+CKEDITOR.config.customConfig = CKTESTER.cell.getAbsolutePath( '_asset/custom-config.js' );
 CKEDITOR.test.addTestCase( ( function ()
 {
Index: /CKEditor/tests/variables.js
===================================================================
--- /CKEditor/tests/variables.js	(revision 4127)
+++ /CKEditor/tests/variables.js	(revision 4128)
@@ -9,5 +9,5 @@
  * so it should be ignored by SVN. 
  */
-CKTester.fort.variables =
+CKTESTER.fort.variables =
 {
 	'CKEDITOR_ROOT' : '../../../CKEditor-V3'
Index: /CKEditor/trunk/_source/core/test.js
===================================================================
--- /CKEditor/trunk/_source/core/test.js	(revision 4127)
+++ /CKEditor/trunk/_source/core/test.js	(revision 4128)
@@ -1,3 +1,3 @@
-﻿/*
+/*
 Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
@@ -5,180 +5,11 @@
 
 /**
- * @fileOverview Defines the {@link CKEDITOR.test} object, which contains
- *		functions used at our testing environment.
+ * @fileOverview Defines the {@link CKEDITOR.test} object, inherited from
+ * {@link CKTESTER.tools}, which encapsulates the CKEditor dedicating testing APIs.
+ *
  */
 
-/*jsl:import ../tests/yuitest.js*/
-
-/**
- * Contains functions used at our testing environment. Currently,
- * our testing system is based on the
- * <a href="http://developer.yahoo.com/yui/yuitest/">YUI Test</a>.
- * @namespace
- * @example
- */
 CKEDITOR.test =
 {
-	/**
-	 * The assertion namespace, containing all assertion functions. Currently,
-	 * this is an alias for
-	 * <a href="http://developer.yahoo.com/yui/docs/YAHOO.util.Assert.html">YAHOO.util.Assert</a>.
-	 * @example
-	 * <b>CKEDITOR.test.assert</b>.areEqual( '10', 10 );        // "true"
-	 * <b>CKEDITOR.test.assert</b>.areSame( '10', 10 );         // "false"
-	 * <b>CKEDITOR.test.assert</b>.isUndefined( window.test );  // "true"
-	 */
-	assert : YAHOO.util.Assert,
-
-	runner : YAHOO.tool.TestRunner,
-
-	/**
-	 * Adds a test case to the test runner.
-	 * @param {Object} testCase The test case object. See other tests for
-	 *		examples.
-	 * @example
-	 * <b>CKEDITOR.test.addTestCase</b>((function()
-	 * {
-	 *     // Local reference to the "assert" object.
-	 *     var assert = CKEDITOR.test.assert;
-	 *
-	 *     return {
-	 *         test_example : function()
-	 *         {
-	 *             assert.areSame( '10', 10 );  // FAIL
-	 *         }
-	 *      };
-	 * })());
-	 */
-	addTestCase : function( testCase )
-	{
-		YAHOO.tool.TestRunner.add( new YAHOO.tool.TestCase( testCase ) );
-	},
-
-	/**
-	 * Gets the inner HTML of an element, for testing purposes.
-	 * @param {Boolean} stripLineBreaks Assign 'false' to avoid trimming line-breaks.
-	 */
-	getInnerHtml : function( elementOrId , stripLineBreaks )
-	{
-		var html;
-
-		if ( typeof elementOrId == 'string' )
-			html = document.getElementById( elementOrId ).innerHTML;
-		else if ( elementOrId.getHtml )
-			html = elementOrId.getHtml();
-		else
-			html = elementOrId.innerHTML    // retrieve from innerHTML
-				   || elementOrId.value;    // retrieve from value
-
-		return CKEDITOR.test.fixHtml( html, stripLineBreaks );
-	},
-
-	fixHtml : function( html, stripLineBreaks )
-	{
-		html = html.toLowerCase();
-
-		if ( stripLineBreaks !== false )
-			html = html.replace( /[\n\r]/g, '' );
-		else
-			html = html.replace( /\r/g, '' );    // Normalize CRLF.
-
-		function sorter( a, b )
-		{
-			var nameA = a[ 0 ];
-			var nameB = b[ 0 ];
-			return nameA < nameB ? -1 : nameA > nameB ? 1 : 0;
-		}
-
-		html = html.replace( /<\w[^>]*/g, function( match )
-			{
-				var attribs = [];
-				var hasClass;
-
-				match = match.replace( /\s([^\s=]+)=((?:"[^"]*")|(?:'[^']*')|(?:[^\s]+))/g, function( match, attName, attValue )
-					{
-						if ( attName == 'style' )
-						{
-							// Reorganize the style rules so they are sorted by name.
-
-							var rules = [];
-
-							// Push all rules into an Array.
-							attValue.replace( /(?:"| |;|^ )\s*([^ :]+?)\s*:\s*([^;"]+?)\s*(?=;|"|$)/g, function( match, name, value )
-								{
-									rules.push( [ name, value ] );
-								});
-
-							// Sort the Array.
-							rules.sort( sorter );
-
-							// Transform each rule entry into a string name:value.
-							for ( var i = 0 ; i < rules.length ; i++ )
-								rules[ i ] = rules[ i ].join( ':' );
-
-							// Join all rules with commas, removing spaces and adding an extra comma to the end.
-							attValue = '"' + rules && ( rules.join( ';' ).replace( /\s+/g, '' ) + ';' );
-						}
-
-						// IE may have 'class' more than once.
-						if ( attName == 'class' )
-						{
-							if ( hasClass )
-								return '';
-
-							hasClass = true;
-						}
-
-						if ( attName != '_cke_expando' )
-							attribs.push( [ attName, attValue ] );
-
-						return '';
-					} );
-
-				attribs.sort( sorter );
-
-				var ret = match.replace( /\s{2,}/g, ' ' );
-
-				for ( var i = 0 ; i < attribs.length ; i++ )
-				{
-					ret += ' ' + attribs[i][0] + '=';
-					ret += (/^["']/).test( attribs[i][1] ) ? attribs[i][1] : '"' + attribs[i][1] + '"';
-				}
-
-				return ret;
-			} );
-
-		return html;
-	},
-
-	/**
-	 * Wrapper of CKEDITOR.dom.element::getAttribute for style text normalization.
-	 * @param element
-	 * @param attrName
-	 */
-	getAttribute : function( element, attrName )
-	{
-		var retval = element.getAttribute( attrName );
-		if ( attrName == 'style' )
-		{
-			// 1. Lower case property name.
-			// 2. Add space after colon.
-			// 3. Strip whitepsaces around semicolon.
-			// 4. Always end with semicolon
-			return retval.replace( /(?:^|;)\s*([A-Z-_]+)(:\s*)/ig,
-				function( match, property, colon )
-				{
-					return property.toLowerCase() + ': ';
-				} )
-				.replace( /\s+(?:;\s*|$)/g, ';' )
-				.replace( /([^;])$/g, '$1;' );
-		}
-
-		return retval;
-	},
-
-	/**
-	 * Whether control the runner manually instead of running on window onload.
-	 */
-	deferRunner : false
 };
+YAHOO.lang.augmentObject( CKEDITOR.test, CKTESTER.tools );
