diff --git a/D7-core-selenium.patch b/D7-core-selenium.patch
index e3bccb5..82244ca 100644
--- a/D7-core-selenium.patch
+++ b/D7-core-selenium.patch
@@ -1,8 +1,8 @@
 diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc
-index bbddde2..c917715 100644
+index 6ebfffe..79a2d30 100644
 --- a/includes/bootstrap.inc
 +++ b/includes/bootstrap.inc
-@@ -2190,9 +2190,9 @@ function drupal_valid_test_ua() {
+@@ -2442,9 +2442,9 @@ function drupal_valid_test_ua() {
      // The file properties add more entropy not easily accessible to others.
      $key = $drupal_hash_salt . filectime(__FILE__) . fileinode(__FILE__);
      $time_diff = REQUEST_TIME - $time;
@@ -15,7 +15,7 @@ index bbddde2..c917715 100644
        return $test_prefix;
      }
 diff --git a/modules/simpletest/drupal_web_test_case.php b/modules/simpletest/drupal_web_test_case.php
-index b60c682..0c67d7b 100644
+index 251c5c1..85b3e88 100644
 --- a/modules/simpletest/drupal_web_test_case.php
 +++ b/modules/simpletest/drupal_web_test_case.php
 @@ -45,6 +45,11 @@ abstract class DrupalTestCase {
@@ -30,7 +30,7 @@ index b60c682..0c67d7b 100644
     * Current results of this test case.
     *
     * @var Array
-@@ -464,6 +469,12 @@ abstract class DrupalTestCase {
+@@ -484,6 +489,12 @@ abstract class DrupalTestCase {
      foreach ($class_methods as $method) {
        // If the current method starts with "test", run it - it's a test.
        if (strtolower(substr($method, 0, 4)) == 'test') {
@@ -43,37 +43,44 @@ index b60c682..0c67d7b 100644
          // Insert a fail record. This will be deleted on completion to ensure
          // that testing completed.
          $method_info = new ReflectionMethod($class, $method);
-@@ -472,18 +483,24 @@ abstract class DrupalTestCase {
+@@ -492,23 +503,28 @@ abstract class DrupalTestCase {
            'line' => $method_info->getStartLine(),
            'function' => $class . '->' . $method . '()',
          );
 -        $completion_check_id = DrupalTestCase::insertAssert($this->testId, $class, FALSE, t('The test did not complete due to a fatal error.'), 'Completion check', $caller);
 -        $this->setUp();
--        try {
--          $this->$method();
--          // Finish up.
--        }
--        catch (Exception $e) {
--          $this->exceptionHandler($e);
-+
+-        if ($this->setup) {
+-          try {
+-            $this->$method();
+-            // Finish up.
 +        // Run test in each browser.
 +        foreach ($info['browsers'] as $browser) {
 +          $this->browser = $browser;
 +
 +          $completion_check_id = DrupalTestCase::insertAssert($this->testId, $class, FALSE, t('The test did not complete due to a fatal error.'), 'Completion check', $caller);
-+          try {
-+            $this->setUp();
-+            $this->$method();
-+            // Finish up.
-+          }
-+          catch (Exception $e) {
-+            $this->exceptionHandler($e);
-+          }
-+          $this->tearDown();
++          $this->setUp();
++          if ($this->setup) {
++            try {
++              $this->$method();
++              // Finish up.
++            }
++            catch (Exception $e) {
++              $this->exceptionHandler($e);
++            }
++            $this->tearDown();
+           }
+-          catch (Exception $e) {
+-            $this->exceptionHandler($e);
++          else {
++            $this->fail(t("The test cannot be executed because it has not been set up properly."));
+           }
+-          $this->tearDown();
+-        }
+-        else {
+-          $this->fail(t("The test cannot be executed because it has not been set up properly."));
 +          // Remove the completion check record.
 +          DrupalTestCase::deleteAssert($completion_check_id);
          }
--        $this->tearDown();
 -        // Remove the completion check record.
 -        DrupalTestCase::deleteAssert($completion_check_id);
        }
