diff --git a/modules/simpletest/tests/common.test b/modules/simpletest/tests/common.test
index 021e721..75dd8c2 100644
--- a/modules/simpletest/tests/common.test
+++ b/modules/simpletest/tests/common.test
@@ -1741,6 +1741,18 @@ class DrupalRenderTestCase extends DrupalWebTestCase {
     $this->assertRaw($message, t('Found error message: !message.', array('!message' => $message)));
   }
 
+  /**
+   * Test rendering top-level elements of a menu page callback.
+   */
+  function testTopLevel() {
+    $this->drupalGet('common-test/drupal-render-type');
+    $elements = $this->xpath('//div[contains(@class, :container-class) and contains(@class, :custom-class)]', array(
+      ':container-class' => 'form-wrapper',
+      ':custom-class' => 'drupal-render-type',
+    ));
+    $this->assertTrue(!empty($elements[0]), 'Top-level page callback render array element output found.');
+  }
+
   protected function assertRenderedElement(array $element, $xpath, array $xpath_args = array()) {
     $original_element = $element;
     $this->drupalSetContent(drupal_render($element));
diff --git a/modules/simpletest/tests/common_test.module b/modules/simpletest/tests/common_test.module
index a3bb9b0..46e6a8f 100644
--- a/modules/simpletest/tests/common_test.module
+++ b/modules/simpletest/tests/common_test.module
@@ -52,6 +52,12 @@ function common_test_menu() {
     'access arguments' => array('access content'),
     'type' => MENU_CALLBACK,
   );
+  $items['common-test/drupal-render-type'] = array(
+    'title' => 'drupal_render() top-level #type',
+    'page callback' => 'common_test_drupal_render_type',
+    'access callback' => TRUE,
+    'type' => MENU_CALLBACK,
+  );
   $items['common-test/drupal-render-invalid-keys'] = array(
     'title' => 'Drupal Render',
     'page callback' => 'common_test_drupal_render_invalid_keys',
@@ -107,6 +113,19 @@ function common_test_destination() {
 }
 
 /**
+ * Returns a render array using a custom #type and properties on the top-level.
+ */
+function common_test_drupal_render_type() {
+  $build = array(
+    '#type' => 'container',
+    '#attributes' => array(
+      'class' => array('drupal-render-type'),
+    ),
+  );
+  return $build;
+}
+
+/**
  * Render an element with an invalid render array key.
  */
 function common_test_drupal_render_invalid_keys() {
