Index: /CKEditor/tests/tt/5500/1.html
===================================================================
--- /CKEditor/tests/tt/5500/1.html	(revision 6456)
+++ /CKEditor/tests/tt/5500/1.html	(revision 6456)
@@ -0,0 +1,121 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+	"http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+	<title>Ticket: #5500 TextField value</title>
+	<meta name="tags" content="editor,unit,all">
+	<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',
+				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_insert_textfield: function()
+		{
+			var editor = ts.editor,
+				output = '<p><input name="name" type="text" value="value" /></p>',
+				command = 'textfield',
+				contentWithSelection = test.getValueAsHtml( 'input_1' );
+			
+			test.setHtmlWithSelection( editor.document.getBody(), contentWithSelection );
+			
+			editor.execCommand( command );
+			//Insert text field	
+			this.wait( function ()
+			{											
+				var dialog = editor._.storedDialogs[ command ],
+					nameField = dialog.getContentElement( 'info', '_cke_saved_name' );
+					valueField = dialog.getContentElement( 'info', 'value' );
+					
+				nameField.setValue( 'name' );
+				valueField.setValue( 'value' );
+				
+				dialog.fire( 'ok' );
+				dialog.hide();	
+				
+				//switch to source 	
+				this.wait(function() 
+				{
+					editor.execCommand( 'source' );
+				
+					//and back to wysiwyg
+					this.wait(function() 
+					{
+						editor.execCommand( 'source' );
+						//Verify content
+						this.wait(function() 
+						{
+							assert.areSame( output, editor.getData() );
+						}, 1000);
+					}, 1000);
+				}, 1000 );
+			}, 1000);
+		},
+		
+		test_insert_passwordfield: function()
+		{
+			var editor = ts.editor,
+				output = '<p><input name="name" type="password" value="value" /></p>',
+				outputIE = '<p><input name="name" type="password" value="" /></p>',
+				command = 'textfield',
+				contentWithSelection = test.getValueAsHtml( 'input_1' );
+			
+			test.setHtmlWithSelection( editor.document.getBody(), contentWithSelection );
+			
+			editor.execCommand( command );
+			//Insert text field	
+			this.wait( function ()
+			{											
+				var dialog = editor._.storedDialogs[ command ],
+					nameField = dialog.getContentElement( 'info', '_cke_saved_name' ),
+					valueField = dialog.getContentElement( 'info', 'value' ),
+					typeField = dialog.getContentElement( 'info', 'type' );
+					
+				typeField.setValue( 'password' );	
+				nameField.setValue( 'name' );
+				valueField.setValue( 'value' );
+				
+				dialog.fire( 'ok' );
+				dialog.hide();	
+				
+				//switch to source 	
+				this.wait(function() 
+				{
+					editor.execCommand( 'source' );
+				
+					//and back to wysiwyg
+					this.wait(function() 
+					{
+						editor.execCommand( 'source' );
+						//Verify content
+						this.wait(function() 
+						{
+							assert.areSame( CKEDITOR.env.ie? outputIE: output, editor.getData() );
+						}, 1000);
+					}, 1000);
+				}, 1000 );
+			}, 1000);
+		}
+	} ) );
+} )();
+	</script>
+</head>
+<body>
+<textarea id='input_1'></textarea>
+</body>
+</html>
