diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Tests/AddFeedTest.php b/core/modules/aggregator/lib/Drupal/aggregator/Tests/AddFeedTest.php
index 6d27c91..fd31add 100644
--- a/core/modules/aggregator/lib/Drupal/aggregator/Tests/AddFeedTest.php
+++ b/core/modules/aggregator/lib/Drupal/aggregator/Tests/AddFeedTest.php
@@ -30,11 +30,14 @@ function testAddFeed() {
     $this->assertTrue($this->uniqueFeed($feed->label(), $feed->url->value), 'The feed is unique.');
 
     // Check feed source.
-    $this->drupalGet('aggregator/sources/' . $feed->id());
-    $this->assertResponse(200, 'Feed source exists.');
+    $code = 200;
+    $message = 'Feed source exists.';
+    $this->drupalGet('aggregator/sources/' . $feed->id(), array(), array(), $code, $message);
     $this->assertText($feed->label(), 'Page title');
-    $this->drupalGet('aggregator/sources/' . $feed->id() . '/categorize');
-    $this->assertResponse(200, 'Feed categorization page exists.');
+
+    $code = 200;
+    $message = 'Feed categorization page exists.';
+    $this->drupalGet('aggregator/sources/' . $feed->id() . '/categorize', array(), array(), $code, $message);
     $this->assertText($feed->label());
 
     // Delete feed.
@@ -59,11 +62,14 @@ function testAddLongFeed() {
     $this->assertTrue($this->uniqueFeed($feed_2->label(), $feed_2->url->value), 'The second long URL feed is unique.');
 
     // Check feed source.
-    $this->drupalGet('aggregator/sources/' . $feed->id());
-    $this->assertResponse(200, 'Long URL feed source exists.');
+    $code = 200;
+    $message = 'Long URL feed source exists.';
+    $this->drupalGet('aggregator/sources/' . $feed->id(), array(), array(), $code, $message);
     $this->assertText($feed->label(), 'Page title');
-    $this->drupalGet('aggregator/sources/' . $feed->id() . '/categorize');
-    $this->assertResponse(200, 'Long URL feed categorization page exists.');
+
+    $code = 200;
+    $message = 'Long URL feed categorization page exists.';
+    $this->drupalGet('aggregator/sources/' . $feed->id() . '/categorize', array(), array(), $code, $message);
     $this->assertText($feed->label());
 
     // Delete feeds.
diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Tests/AggregatorConfigurationTest.php b/core/modules/aggregator/lib/Drupal/aggregator/Tests/AggregatorConfigurationTest.php
index 59d5339..3eca9c1 100644
--- a/core/modules/aggregator/lib/Drupal/aggregator/Tests/AggregatorConfigurationTest.php
+++ b/core/modules/aggregator/lib/Drupal/aggregator/Tests/AggregatorConfigurationTest.php
@@ -61,7 +61,8 @@ function testSettingsPage() {
     // that provides the selected plugins.
     module_disable(array('aggregator_test'));
     $this->resetAll();
-    $this->drupalGet('admin/config/services/aggregator/settings');
-    $this->assertResponse(200);
+
+    $code = 200;
+    $this->drupalGet('admin/config/services/aggregator/settings', array(), array(), $code);
   }
 }
diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Tests/AggregatorTestBase.php b/core/modules/aggregator/lib/Drupal/aggregator/Tests/AggregatorTestBase.php
index 0452453..a4de94f 100644
--- a/core/modules/aggregator/lib/Drupal/aggregator/Tests/AggregatorTestBase.php
+++ b/core/modules/aggregator/lib/Drupal/aggregator/Tests/AggregatorTestBase.php
@@ -154,12 +154,13 @@ function getDefaultFeedItemCount() {
    */
   function updateFeedItems(Feed $feed, $expected_count = NULL) {
     // First, let's ensure we can get to the rss xml.
-    $this->drupalGet($feed->url->value);
-    $this->assertResponse(200, format_string('!url is reachable.', array('!url' => $feed->url->value)));
+    $code = 200;
+    $messsage = format_string('!url is reachable.', array('!url' => $feed->url->value));
+    $this->drupalGet($feed->url->value, array(), array(), $code, $messsage);
 
     // Attempt to access the update link directly without an access token.
-    $this->drupalGet('admin/config/services/aggregator/update/' . $feed->id());
-    $this->assertResponse(403);
+    $code = 403;
+    $this->drupalGet('admin/config/services/aggregator/update/' . $feed->id(), array(), array(), $code);
 
     // Refresh the feed (simulated link click).
     $this->drupalGet('admin/config/services/aggregator');
diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Tests/FeedParserTest.php b/core/modules/aggregator/lib/Drupal/aggregator/Tests/FeedParserTest.php
index 5f4f9f9..d628c5b 100644
--- a/core/modules/aggregator/lib/Drupal/aggregator/Tests/FeedParserTest.php
+++ b/core/modules/aggregator/lib/Drupal/aggregator/Tests/FeedParserTest.php
@@ -33,8 +33,10 @@ function setUp() {
   function testRSS091Sample() {
     $feed = $this->createFeed($this->getRSS091Sample());
     aggregator_refresh($feed);
-    $this->drupalGet('aggregator/sources/' . $feed->id());
-    $this->assertResponse(200, format_string('Feed %name exists.', array('%name' => $feed->label())));
+
+    $code = 200;
+    $message =  format_string('Feed %name exists.', array('%name' => $feed->label()));
+    $this->drupalGet('aggregator/sources/' . $feed->id(), array(), array(), $code, $message);
     $this->assertText('First example feed item title');
     $this->assertLinkByHref('http://example.com/example-turns-one');
     $this->assertText('First example feed item description.');
@@ -55,8 +57,10 @@ function testRSS091Sample() {
   function testAtomSample() {
     $feed = $this->createFeed($this->getAtomSample());
     aggregator_refresh($feed);
-    $this->drupalGet('aggregator/sources/' . $feed->id());
-    $this->assertResponse(200, format_string('Feed %name exists.', array('%name' => $feed->label())));
+
+    $code = 200;
+    $message = format_string('Feed %name exists.', array('%name' => $feed->label()));
+    $this->drupalGet('aggregator/sources/' . $feed->id(), array(), array(), $code, $message);
     $this->assertText('Atom-Powered Robots Run Amok');
     $this->assertLinkByHref('http://example.org/2003/12/13/atom03');
     $this->assertText('Some text.');
@@ -69,8 +73,9 @@ function testAtomSample() {
   function testHtmlEntitiesSample() {
     $feed = $this->createFeed($this->getHtmlEntitiesSample());
     aggregator_refresh($feed);
-    $this->drupalGet('aggregator/sources/' . $feed->id());
-    $this->assertResponse(200, format_string('Feed %name exists.', array('%name' => $feed->label())));
+    $code = 200;
+    $message = format_string('Feed %name exists.', array('%name' => $feed->label()));
+    $this->drupalGet('aggregator/sources/' . $feed->id(), array(), array(), $code, $message);
     $this->assertRaw("Quote&quot; Amp&amp;");
   }
 
diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Tests/RemoveFeedTest.php b/core/modules/aggregator/lib/Drupal/aggregator/Tests/RemoveFeedTest.php
index f16665d..5a947e2 100644
--- a/core/modules/aggregator/lib/Drupal/aggregator/Tests/RemoveFeedTest.php
+++ b/core/modules/aggregator/lib/Drupal/aggregator/Tests/RemoveFeedTest.php
@@ -29,8 +29,9 @@ function testRemoveFeed() {
     $this->deleteFeed($feed);
 
     // Check feed source.
-    $this->drupalGet('aggregator/sources/' . $feed->id());
-    $this->assertResponse(404, 'Deleted feed source does not exists.');
+    $code = 404;
+    $message = 'Deleted feed source does not exists.';
+    $this->drupalGet('aggregator/sources/' . $feed->id(), array(), array(), $code, $message);
 
     // Check database for feed.
     $result = db_query("SELECT COUNT(*) FROM {aggregator_feed} WHERE title = :title AND url = :url", array(':title' => $feed->label(), ':url' => $feed->url->value))->fetchField();
diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Tests/UpdateFeedItemTest.php b/core/modules/aggregator/lib/Drupal/aggregator/Tests/UpdateFeedItemTest.php
index 2cc1c8c..64f10c2 100644
--- a/core/modules/aggregator/lib/Drupal/aggregator/Tests/UpdateFeedItemTest.php
+++ b/core/modules/aggregator/lib/Drupal/aggregator/Tests/UpdateFeedItemTest.php
@@ -41,8 +41,9 @@ function testUpdateFeedItem() {
       'url' => $this->getRSS091Sample(),
     );
 
-    $this->drupalGet($edit['url']);
-    $this->assertResponse(array(200), format_string('URL !url is accessible', array('!url' => $edit['url'])));
+    $code = 200;
+    $message =  format_string('URL !url is accessible', array('!url' => $edit['url']));
+    $this->drupalGet($edit['url'], array(), array(), $code, $message);
 
     $this->drupalPost('admin/config/services/aggregator/add/feed', $edit, t('Save'));
     $this->assertRaw(t('The feed %name has been added.', array('%name' => $edit['title'])), format_string('The feed !name has been added.', array('!name' => $edit['title'])));
diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Tests/UpdateFeedTest.php b/core/modules/aggregator/lib/Drupal/aggregator/Tests/UpdateFeedTest.php
index 8b25bc7..fd34b48 100644
--- a/core/modules/aggregator/lib/Drupal/aggregator/Tests/UpdateFeedTest.php
+++ b/core/modules/aggregator/lib/Drupal/aggregator/Tests/UpdateFeedTest.php
@@ -41,8 +41,9 @@ function testUpdateFeed() {
       $this->assertTrue($this->uniqueFeed($edit['title'], $edit['url']), 'The feed is unique.');
 
       // Check feed source.
-      $this->drupalGet('aggregator/sources/' . $feed->id());
-      $this->assertResponse(200, 'Feed source exists.');
+      $code = 200;
+      $message = 'Feed source exists.';
+      $this->drupalGet('aggregator/sources/' . $feed->id(), array(), array(), $code, $message);
       $this->assertText($edit['title'], 'Page title');
 
       // Delete feed.
diff --git a/core/modules/simpletest/lib/Drupal/simpletest/Tests/SimpleTestTest.php b/core/modules/simpletest/lib/Drupal/simpletest/Tests/SimpleTestTest.php
index a4641f6..3d609ff 100644
--- a/core/modules/simpletest/lib/Drupal/simpletest/Tests/SimpleTestTest.php
+++ b/core/modules/simpletest/lib/Drupal/simpletest/Tests/SimpleTestTest.php
@@ -111,25 +111,19 @@ function testUserAgentValidation() {
       $this->additionalCurlOptions = array(CURLOPT_USERAGENT => $test_ua);
 
       // Test pages only available for testing.
-      $this->drupalGet($HTTP_path);
-      $this->assertResponse(200, 'Requesting http.php with a legitimate simpletest User-Agent returns OK.');
-      $this->drupalGet($https_path);
-      $this->assertResponse(200, 'Requesting https.php with a legitimate simpletest User-Agent returns OK.');
+      $this->drupalGet($HTTP_path, array(), array(), 200, 'Requesting http.php with a legitimate simpletest User-Agent returns OK.');
+      $this->drupalGet($https_path, array(), array(), 200, 'Requesting https.php with a legitimate simpletest User-Agent returns OK.');
 
       // Now slightly modify the HMAC on the header, which should not validate.
       $this->additionalCurlOptions = array(CURLOPT_USERAGENT => $test_ua . 'X');
-      $this->drupalGet($HTTP_path);
-      $this->assertResponse(403, 'Requesting http.php with a bad simpletest User-Agent fails.');
-      $this->drupalGet($https_path);
-      $this->assertResponse(403, 'Requesting https.php with a bad simpletest User-Agent fails.');
+      $this->drupalGet($HTTP_path, array(), array(), 403, 'Requesting http.php with a bad simpletest User-Agent fails.');
+      $this->drupalGet($https_path, array(), array(), 403, 'Requesting https.php with a bad simpletest User-Agent fails.');
 
       // Use a real User-Agent and verify that the special files http.php and
       // https.php can't be accessed.
       $this->additionalCurlOptions = array(CURLOPT_USERAGENT => 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12');
-      $this->drupalGet($HTTP_path);
-      $this->assertResponse(403, 'Requesting http.php with a normal User-Agent fails.');
-      $this->drupalGet($https_path);
-      $this->assertResponse(403, 'Requesting https.php with a normal User-Agent fails.');
+      $this->drupalGet($HTTP_path, array(), array(), 403, 'Requesting http.php with a normal User-Agent fails.');
+      $this->drupalGet($https_path, array(), array(), 403, 'Requesting https.php with a normal User-Agent fails.');
     }
   }
 
diff --git a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
index a75ade4..d36db7f 100644
--- a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
+++ b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
@@ -1168,17 +1168,21 @@ protected function parse() {
   /**
    * Retrieves a Drupal path or an absolute path.
    *
-   * @param $path
+   * @param string $path
    *   Drupal path or URL to load into internal browser
-   * @param $options
+   * @param array $options
    *   Options to be forwarded to url().
-   * @param $headers
+   * @param array $headers
    *   An array containing additional HTTP request headers, each formatted as
    *   "name: value".
-   * @return
+   * @param int|null $code
+   *   The expected response code, defaults to NULL>
+   * @param string $message
+   *   Sets the message of the response assertion if code is specified.
+   * @return string
    *   The retrieved HTML string, also available as $this->drupalGetContent()
    */
-  protected function drupalGet($path, array $options = array(), array $headers = array()) {
+  protected function drupalGet($path, array $options = array(), array $headers = array(), $code = NULL, $message = '') {
     $options['absolute'] = TRUE;
 
     // We re-using a CURL connection here. If that connection still has certain
@@ -1194,6 +1198,11 @@ protected function drupalGet($path, array $options = array(), array $headers = a
     $this->verbose('GET request to: ' . $path .
                    '<hr />Ending URL: ' . $this->getUrl() .
                    '<hr />' . $out);
+
+    if (isset($code)) {
+      $this->assertResponse($code, $message);
+    }
+
     return $out;
   }
 
