Index: /CKEditor/branches/tests/editor/tt/4227/4227.html
===================================================================
--- /CKEditor/branches/tests/editor/tt/4227/4227.html	(revision 4096)
+++ /CKEditor/branches/tests/editor/tt/4227/4227.html	(revision 4096)
@@ -0,0 +1,38 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+	"http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+	<title>Ticket: #4227</title>
+	<script type="text/javascript" src="../../../cktester/cell.js"></script>
+	<script>
+CKEDITOR.test.addTestCase( {
+	/**
+	 * Test destroying an editor instance created from textarea which is not inside a form. 
+	 */
+	test_destroy : function()
+	{
+		var self = this;
+
+		CKEDITOR.replace( 'editor1',
+			{
+				on :
+				{
+					instanceReady : function()
+					{
+						self.resume( function()
+						{
+							CKEDITOR.instances.editor1.destroy();
+						} );
+					}
+				}
+			} );
+
+		this.wait();
+	}
+} );
+	</script>
+</head>
+<body>
+<textarea id="editor1"></textarea>
+</body>
+</html>
Index: /CKEditor/branches/tests/profile.js
===================================================================
--- /CKEditor/branches/tests/profile.js	(revision 4095)
+++ /CKEditor/branches/tests/profile.js	(revision 4096)
@@ -34,5 +34,6 @@
  			[ '../editor/tt/4219/4219', [  'unit', 'all' ] ],
  			[ '../editor/tt/3978/3978', [  'unit', 'all', 'core-dom-element' ] ],
- 			[ '../editor/tt/3009/3009', [ 'unit', 'all' ] ]
+ 			[ '../editor/tt/3009/3009', [ 'unit', 'all' ] ],
+ 			[ '../editor/tt/4227/4227', [ 'unit', 'all' ] ]
 		],
 
