diff --git a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
index a75ade4..ab0e2d7 100644
--- a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
+++ b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
@@ -1175,10 +1175,19 @@ protected function parse() {
    * @param $headers
    *   An array containing additional HTTP request headers, each formatted as
    *   "name: value".
+   * @param $response_code
+   *   (optional) An array or string containing the response code(s) that needs
+   *   to be sent to assertReponse(). For example 200 is a successful page
+   *   request. For a list of all codes see:
+   *   http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html.
+   * @param $message
+   *   (optional) A message to display with the assertion. Do not translate
+   *   messages: use format_string() to embed variables in the message text, not
+   *   t(). If left blank, a default message will be displayed.
    * @return
    *   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(), $response_code = 200, $message = NULL) {
     $options['absolute'] = TRUE;

     // We re-using a CURL connection here. If that connection still has certain
@@ -1194,6 +1203,8 @@ protected function drupalGet($path, array $options = array(), array $headers = a
     $this->verbose('GET request to: ' . $path .
                    '<hr />Ending URL: ' . $this->getUrl() .
                    '<hr />' . $out);
+
+    $this->assertResponse($response_code, $message);
     return $out;
   }

@@ -1591,7 +1602,8 @@ protected function drupalPostAJAX($path, $edit, $triggering_element, $ajax_path
    * Runs cron in the Drupal installed by Simpletest.
    */
   protected function cronRun() {
-    $this->drupalGet('cron/' . state()->get('system.cron_key'));
+    $codes = array(200, 204); // Acceptable response codes.
+    $this->drupalGet('cron/' . state()->get('system.cron_key'), array(), array(), $codes);
   }

   /**
@@ -3064,8 +3076,9 @@ protected function constructFieldXpath($attribute, $value) {
    * Asserts the page responds with the specified response code.
    *
    * @param $code
-   *   Response code. For example 200 is a successful page request. For a list
-   *   of all codes see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html.
+   *   An array or string containing the esponse code(s). For example 200 is a
+   *   successful page request. For a list of all codes see:
+   *   http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html.
    * @param $message
    *   (optional) A message to display with the assertion. Do not translate
    *   messages: use format_string() to embed variables in the message text, not
@@ -3082,6 +3095,12 @@ protected function constructFieldXpath($attribute, $value) {
   protected function assertResponse($code, $message = '', $group = 'Browser') {
     $curl_code = curl_getinfo($this->curlHandle, CURLINFO_HTTP_CODE);
     $match = is_array($code) ? in_array($curl_code, $code) : $curl_code == $code;
+
+    // Reformat $code if it is an array.
+    if(is_array($code)) {
+      $code = implode(', ', $code);
+    }
+
     return $this->assertTrue($match, $message ? $message : t('HTTP response expected !code, actual !curl_code', array('!code' => $code, '!curl_code' => $curl_code)), $group);
   }

@@ -3089,8 +3108,9 @@ protected function assertResponse($code, $message = '', $group = 'Browser') {
    * Asserts the page did not return the specified response code.
    *
    * @param $code
-   *   Response code. For example 200 is a successful page request. For a list
-   *   of all codes see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html.
+   *   An array or string containing the esponse code(s). For example 200 is a
+   *   successful page request. For a list of all codes see:
+   *   http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html.
    * @param $message
    *   (optional) A message to display with the assertion. Do not translate
    *   messages: use format_string() to embed variables in the message text, not
