Index: /CKEditor/tests/tt/4527/1.html
===================================================================
--- /CKEditor/tests/tt/4527/1.html	(revision 4543)
+++ /CKEditor/tests/tt/4527/1.html	(revision 4543)
@@ -0,0 +1,103 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+	"http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+	<title>Ticket: #4527 - Checkbox dialog</title>
+	<meta name="tags" content="editor,unit,all">
+	<script type="text/javascript" src="../../cktester/cell.js"></script>
+	<script>
+( function()
+{
+	var ts, tc, test = CKEDITOR.test, assert = CKEDITOR.test.assert;
+	function getTextAreaContent( id )
+	{
+		return CKEDITOR.test.fixHtml( CKEDITOR.document.getById( id ).getValue(), true, false );
+	}
+
+	YAHOO.tool.TestRunner.add( ts = new CKEDITOR.test.suites.editorTestSuite(
+		{
+				editorName : 'editor1',
+				startupData : '',
+				name :document.title,
+				config :
+				{
+					forceSimpleAmpersand : true,
+					mailProtection : 'encode'
+				}
+		} ) );
+
+	ts.add( tc = new YAHOO.tool.TestCase(
+		{
+			setUp : function ()
+			{
+				// Force result data unformatted.
+				ts.editor.dataProcessor.writer._.rules = {};
+				ts.editor.focus();
+			},
+
+			/**
+			 * Test email address attribute are well protected into encoded chars.
+			 */
+			test_insert_checkbox : function()
+			{
+				var editor = ts.editor,
+					command = 'checkbox';
+
+				editor.execCommand( command );
+
+				// waiting for dialog to open.
+				this.wait( function()
+				{
+					 var dialog = editor._.storedDialogs[ command ],
+						 nameField = dialog.getContentElement( 'info', 'txtName' ),
+						 valueField = dialog.getContentElement( 'info', 'txtValue' ),
+						 checkedField = dialog.getContentElement( 'info', 'cmbSelected' );
+
+					nameField.setValue( 'name' );
+					valueField.setValue( 'value' );
+					checkedField.setValue( 'checked' );
+					dialog.fire( 'ok' );
+					dialog.hide();
+					
+					assert.areEqual( '<p><input checked="checked" name="name" type="checkbox" value="value" /></p>',
+									 editor.getData(), 'Inserted checkbox doesn\'t match.' );
+
+				}, 1000 );
+			},
+
+			test_update_checkbox : function()
+			{
+				var editor = ts.editor,
+					command = 'checkbox';
+
+				test.setHtmlWithSelection( editor.document.getBody(), '[<input checked="checked" name="name" type="checkbox" value="value" />]' );
+
+				editor.execCommand( command );
+
+				// waiting for dialog to open.
+				this.wait( function()
+				{
+					 var dialog = editor._.storedDialogs[ command ],
+						 nameField = dialog.getContentElement( 'info', 'txtName' ),
+						 valueField = dialog.getContentElement( 'info', 'txtValue' ),
+						 checkedField = dialog.getContentElement( 'info', 'cmbSelected' );
+
+					nameField.setValue( '' );
+					valueField.setValue( '' );
+					checkedField.setValue( '' );
+					dialog.fire( 'ok' );
+					dialog.hide();
+					
+					assert.areEqual( '<p><input type="checkbox" /></p>',
+									 editor.getData(), 'Inserted checkbox doesn\'t match.' );
+
+				}, 1000 );
+			}
+
+		} ) );
+} )();
+	</script>
+</head>
+<body>
+</body>
+</html>
Index: /CKEditor/tests/tt/4527/2.html
===================================================================
--- /CKEditor/tests/tt/4527/2.html	(revision 4543)
+++ /CKEditor/tests/tt/4527/2.html	(revision 4543)
@@ -0,0 +1,56 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+	"http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+	<title>Ticket: #4527 - Copy Attributes</title>
+	<meta name="tags" content="editor,unit,all">
+	<script type="text/javascript" src="../../cktester/cell.js"></script>
+	<script>
+( function()
+{
+	var ts, tc, test = CKEDITOR.test, assert = CKEDITOR.test.assert;
+
+	tc = test.addTestCase(
+		{
+//			shouldIgnoreAllBut : [ 'test_getAttribute_checked' ],
+			
+			/**
+			 * Test set and retrieve 'checked' attribute value.
+			 */
+			test_getAttribute_checked : function()
+			{
+				var unchecked1 = new CKEDITOR.dom.element.createFromHtml( '<input type="checkbox" />' )
+					checked1 = new CKEDITOR.dom.element.createFromHtml( '<input type="checkbox" checked="checked" />' ),
+					checked2 = new CKEDITOR.dom.element( 'input');
+
+				checked2.setAttribute( 'type', 'checkbox' );
+				checked2.setAttribute( 'checked', 'checked' );
+				assert.isTrue( !unchecked1.getAttribute( 'checked' ) );
+				assert.areSame( 'checked', checked1.getAttribute( 'checked' ) );
+				assert.areSame( 'checked', checked2.getAttribute( 'checked' ) );
+			},
+
+			/**
+			 * Test copy the 'checked' attribute.
+			 */
+			test_copyAttributes_checked : function()
+			{
+				var original1 = new CKEDITOR.dom.element.createFromHtml( '<input type="checkbox" checked="checked" />' ),
+					original2 = new CKEDITOR.dom.element( 'input'),
+					clone1 = new CKEDITOR.dom.element( 'input' ),
+					clone2 = new CKEDITOR.dom.element( 'input' );
+
+				original2.setAttribute( 'type', 'checkbox' );
+				original2.setAttribute( 'checked', 'checked' );
+				original1.copyAttributes( clone1 );
+				original2.copyAttributes( clone2 );
+				assert.areSame( 'checked', clone1.getAttribute( 'checked' ) );
+				assert.areSame( 'checked', clone2.getAttribute( 'checked' ) );
+			}
+		} );
+} )();
+	</script>
+</head>
+<body>
+</body>
+</html>
