Index: /CKEditor/tests/tt/7028/1.html
===================================================================
--- /CKEditor/tests/tt/7028/1.html	(revision 7002)
+++ /CKEditor/tests/tt/7028/1.html	(revision 7002)
@@ -0,0 +1,107 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+	"http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+	<title>Ticket: #7028 Replace dialog</title>
+	<meta name="tags" content="editor,unit,all,stable">
+	<script type="text/javascript" src="../../cktester/cell.js"></script>
+	<script>
+( function()
+{
+	var ts, tc, assert = CKEDITOR.test.assert, test = CKEDITOR.test, selector = YAHOO.util.Selector;
+
+	YAHOO.tool.TestRunner.add( ts = new CKEDITOR.test.suites.editorTestSuite(
+		{
+				editorName : 'test_editor_1',
+				//enterMode : CKEDITOR.ENTER_BR,
+				name :document.title
+		} ) );
+
+	ts.add( tc = new YAHOO.tool.TestCase(
+		{
+			setUp : function ()
+			{
+				// Force result data un-formatted.
+				ts.editor.dataProcessor.writer._.rules = {};
+				ts.editor.focus();
+
+			},
+
+			
+			test_replace_1: function()
+			{
+				var editor = ts.editor,
+				
+					contentWithSelection = test.getValueAsHtml( 'input' ),
+					output = '<ul><li>thichanged is the first line.</li></ul>';
+					command = 'replace';
+				
+				test.setHtmlWithSelection( editor.document.getBody(), contentWithSelection );
+				
+				editor.execCommand( command );
+
+				this.wait( function ()
+				{
+					
+					var dialog = editor._.storedDialogs[ command ],
+						findField = dialog.getContentElement( 'replace', 'txtFindReplace' ),
+						replaceField = dialog.getContentElement( 'replace', 'txtReplace' ),
+						replaceButton = dialog.getContentElement( 'replace', 'btnFindReplace' );
+						
+						
+					findField.setValue( 's' );
+					replaceField.setValue( 'changed' );
+					this.wait( function ()
+					{
+						replaceButton.click();
+						replaceButton.click();
+						dialog.fire('cancel')
+						dialog.hide();
+						
+						assert.areSame( output, editor.getData() );
+					}, 1000 );
+				}, 1000 );
+			},
+			
+			test_replace_all: function()
+			{
+				var editor = ts.editor,
+				
+					contentWithSelection = test.getValueAsHtml( 'input' ),
+					output = '<ul><li>thichanged ichanged the firchangedt line.</li></ul>';
+					command = 'replace';
+				
+				test.setHtmlWithSelection( editor.document.getBody(), contentWithSelection );
+				
+				editor.execCommand( command );
+
+				this.wait( function ()
+				{
+					
+					var dialog = editor._.storedDialogs[ command ],
+						findField = dialog.getContentElement( 'replace', 'txtFindReplace' ),
+						replaceField = dialog.getContentElement( 'replace', 'txtReplace' ),
+						replaceAllButton = dialog.getContentElement( 'replace', 'btnReplaceAll' );
+						
+					findField.setValue( 's' );
+					replaceField.setValue( 'changed' );
+					replaceAllButton.click();
+					
+					dialog.fire('cancel')
+					dialog.hide();
+					
+					assert.areSame( output, editor.getData() );
+					
+				}, 1000 );
+			}
+		} ) );
+} )();
+	</script>
+</head>
+<body><textarea id='input'>
+<ul>
+	<li>
+		This is the first line.</li>
+</ul>
+</textarea></body>
+</html>
