Index: /CKEditor/tests/tt/6642/1.html
===================================================================
--- /CKEditor/tests/tt/6642/1.html	(revision 7166)
+++ /CKEditor/tests/tt/6642/1.html	(revision 7166)
@@ -0,0 +1,64 @@
+<!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.htmlParser</title>
+	<meta name="tags" content="editor,unit,all">
+	<script type="text/javascript" src="../../cktester/cell.js"></script>
+	<script type="text/javascript">
+	//<![CDATA[
+CKEDITOR.test.runner.defer = true;
+CKEDITOR.plugins.load( 'htmlwriter' , function()
+{
+ CKEDITOR.test.runner.run();
+} );
+
+var tc;
+CKEDITOR.test.addTestCase( tc = ( function()
+{
+	// Local reference to the "assert" object.
+	var assert = YAHOO.util.Assert;
+
+	/**
+	 * Wrapper of the combination of htmlParser with htmlWriter, for convenience of
+	 * testing, formatting of writer has been disabled.
+	 */
+	function htmlParse( htmlString , writerConfig)
+	{
+		var writer = new CKEDITOR.htmlParser.basicWriter();
+		writer.reset();
+		var fragment = CKEDITOR.htmlParser.fragment.fromHtml( htmlString );
+		fragment.writeHtml( writer );
+		return writer.getHtml();
+	}
+
+	return {
+
+//		shouldIgnoreAllBut : [ 'test_fix_orphan_list' ],
+
+		test_fix_nested_block : function()
+		{
+			assert.areSame( '<p>a</p><h1>b</h1>', htmlParse( '<p>a<h1>b</h1></p>' ), 'inner at end of outer block.' );
+			assert.areSame( '<p>a</p><h1>b</h1>', htmlParse( '<p>a<h1>b</h1><br /></p>' ), 'inner at end of outer block.' );
+			assert.areSame( '<h1>a</h1><h1>b</h1>', htmlParse( '<h1>a<h1>b</h1></h1>' ), 'inner at end of outer block.' );
+			assert.areSame( '<h1>b</h1><p>a</p>', htmlParse( '<p><h1>b</h1>a</p>' ), 'inner at front of outer block.' );
+			assert.areSame( '<p>a</p><h1>b</h1><p>c</p>', htmlParse( '<p>a<h1>b</h1>c</p>' ), 'inner at mid of outer block.' );
+			assert.areSame( '<h1>b</h1>', htmlParse( '<p><h1>b</h1></p>' ), 'outer block fully embrace the inner block.' );
+			assert.areSame( '<p>a<strong>b</strong></p><h1><strong>c</strong></h1><p><strong>b</strong>a</p>',
+				htmlParse( '<p>a<strong>b<h1>c</h1>b</strong>a</p>' ), 'inner block two-level nested inside inline element.' );
+		},
+
+		test_fix_orphan_list : function()
+		{
+			assert.areSame( '<p>a</p><ul><li>b</li><li>c</li></ul><p>d</p>', htmlParse( '<p>a<li>b</li><li>c</li>d</p>' ), 'orphan list items inside paragraphs.' );
+			assert.areSame( '<ul><li>a</li></ul>b<ul><li>c</li></ul>', htmlParse( '<li>a</li>b<li>c</li>' ), 'orphan list items.' );
+		},
+		name : document.title
+	};
+} )() );
+
+	//]]>
+	</script>
+</head>
+<body>
+</body>
+</html>
