Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Unified Diff: patch.diff

Issue 27420005: [chromedriver] Don't catch exceptions raised during quit. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/webdriver/
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test-nodeps-srcs.jar » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: patch.diff
===================================================================
--- patch.diff (revision 228549)
+++ patch.diff (working copy)
@@ -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..5eb4477 100755
+index e5beaf1..5c99be1 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,7 @@
import org.openqa.selenium.environment.GlobalTestEnvironment;
import org.openqa.selenium.environment.InProcessTestEnvironment;
import org.openqa.selenium.environment.TestEnvironment;
-@@ -94,6 +95,22 @@ public WebDriver getWrappedDriver() {
+@@ -94,6 +95,18 @@ public WebDriver getWrappedDriver() {
public static WebDriver actuallyCreateDriver() {
WebDriver driver = storedDriver.get();
@@ -86,26 +86,33 @@
+ if (driver != null)
+ driver.getCurrentUrl();
+ } catch (WebDriverException e) {
-+ try {
-+ driver.quit();
-+ } catch (RuntimeException ignored) {
-+ // fall through
-+ logger.warning(ignored.getMessage());
-+ }
++ driver.quit();
+ driver = null;
+ }
++
if (driver == null) {
driver = new WebDriverBuilder().get();
storedDriver.set(driver);
-@@ -116,6 +133,7 @@ public static void removeDriver() {
- current.quit();
- } catch (RuntimeException ignored) {
- // fall through
-+ logger.warning(ignored.getMessage());
+@@ -107,17 +120,11 @@ public static void removeDriver() {
}
+ WebDriver current = storedDriver.get();
+-
+ if (current == null) {
+ return;
+ }
+
+- try {
+- current.quit();
+- } catch (RuntimeException ignored) {
+- // fall through
+- }
+-
++ current.quit();
storedDriver.remove();
-@@ -126,4 +144,4 @@ protected boolean isIeDriverTimedOutException(IllegalStateException e) {
+ }
+
+@@ -126,4 +133,4 @@ protected boolean isIeDriverTimedOutException(IllegalStateException e) {
return e.getClass().getName().contains("TimedOutException");
}
« no previous file with comments | « no previous file | test-nodeps-srcs.jar » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698