[chromedriver] Actually terminate the suite if failed to quit.

BUG=None
R=kkania@chromium.org

Review URL: https://codereview.chromium.org/32343003

git-svn-id: http://src.chromium.org/svn/trunk/deps/third_party/webdriver@229996 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
diff --git a/patch.diff b/patch.diff
index 2ba50cb..de7f6a5 100644
--- a/patch.diff
+++ b/patch.diff
@@ -63,7 +63,7 @@
        HttpResponse response = fallBackExecute(context, httpMethod);
        log(LogType.PROFILER, new HttpProfilerLogEntry(command.getName(), false));
 diff --git a/java/client/test/org/openqa/selenium/testing/JUnit4TestBase.java b/java/client/test/org/openqa/selenium/testing/JUnit4TestBase.java
-index e5beaf1..5c99be1 100755
+index e5beaf1..5cb9047 100755
 --- a/java/client/test/org/openqa/selenium/testing/JUnit4TestBase.java
 +++ b/java/client/test/org/openqa/selenium/testing/JUnit4TestBase.java
 @@ -28,6 +28,7 @@
@@ -74,7 +74,16 @@
  import org.openqa.selenium.environment.GlobalTestEnvironment;
  import org.openqa.selenium.environment.InProcessTestEnvironment;
  import org.openqa.selenium.environment.TestEnvironment;
-@@ -94,6 +95,18 @@ public WebDriver getWrappedDriver() {
+@@ -86,7 +87,7 @@ protected void finished(Description description) {
+       logger.info("<<< Finished " + description);
+     }
+   };
+-  
++
+   public WebDriver getWrappedDriver() {
+     return storedDriver.get();
+   }
+@@ -94,6 +95,22 @@ public WebDriver getWrappedDriver() {
    public static WebDriver actuallyCreateDriver() {
      WebDriver driver = storedDriver.get();
  
@@ -86,14 +95,18 @@
 +      if (driver != null)
 +        driver.getCurrentUrl();
 +    } catch (WebDriverException e) {
-+      driver.quit();
++      try {
++        driver.quit();
++      } catch (RuntimeException ignored) {
++        System.exit(1);
++      }
 +      driver = null;
 +    }
 +
      if (driver == null) {
        driver = new WebDriverBuilder().get();
        storedDriver.set(driver);
-@@ -107,17 +120,11 @@ public static void removeDriver() {
+@@ -107,7 +124,6 @@ public static void removeDriver() {
      }
  
      WebDriver current = storedDriver.get();
@@ -101,18 +114,18 @@
      if (current == null) {
        return;
      }
- 
--    try {
--      current.quit();
--    } catch (RuntimeException ignored) {
+@@ -115,9 +131,8 @@ public static void removeDriver() {
+     try {
+       current.quit();
+     } catch (RuntimeException ignored) {
 -      // fall through
--    }
++      System.exit(1);
+     }
 -
-+    current.quit();
      storedDriver.remove();
    }
  
-@@ -126,4 +133,4 @@ protected boolean isIeDriverTimedOutException(IllegalStateException e) {
+@@ -126,4 +141,4 @@ protected boolean isIeDriverTimedOutException(IllegalStateException e) {
      return e.getClass().getName().contains("TimedOutException");
    }
  
diff --git a/test-nodeps-srcs.jar b/test-nodeps-srcs.jar
index fbc8a06..146d454 100644
--- a/test-nodeps-srcs.jar
+++ b/test-nodeps-srcs.jar
Binary files differ
diff --git a/test-standalone.jar b/test-standalone.jar
index 3e5deb2..ac01f9d 100644
--- a/test-standalone.jar
+++ b/test-standalone.jar
Binary files differ