Index: tests/phpunit/tests/formatting/Autop.php
===================================================================
--- tests/phpunit/tests/formatting/Autop.php	(revision 29400)
+++ tests/phpunit/tests/formatting/Autop.php	(working copy)
@@ -400,4 +400,17 @@
 
 		$this->assertEquals( $expected, trim( wpautop( $content ) ) );
 	}
+
+	/**
+	 * wpautop() should correctly pee in blocks
+	 *
+	 * @ticket 27350
+	 */
+	function test_pee_in_divs() {
+		$str = "<div>hello\n<pre>test</pre>\nworld</div>";
+		$this->assertEquals( "<div>\n<p>hello</p>\n<pre>test</pre>\n<p>world</p>\n</div>", trim( wpautop( $str ) ) );
+
+		$str = "hello<div>test</div>";
+		$this->assertEquals( "<p>hello</p>\n<div>\n<p>test</p>\n</div>", trim( wpautop( $str ) ) );
+	}
 }
