Skip to content

Commit f9cba0f

Browse files
committed
Deleting deprecated (in 3.6) methods
1 parent 5d88c7b commit f9cba0f

File tree

2 files changed

+0
-84
lines changed

2 files changed

+0
-84
lines changed

java/client/src/org/openqa/selenium/remote/RemoteWebDriver.java

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -126,18 +126,6 @@ public RemoteWebDriver(CommandExecutor executor, Capabilities capabilities) {
126126
((NeedsLocalLogs)executor).setLocalLogs(localLogs);
127127
}
128128

129-
try {
130-
startClient(capabilities);
131-
} catch (RuntimeException e) {
132-
try {
133-
stopClient(capabilities);
134-
} catch (Exception ignored) {
135-
// Ignore the clean-up exception. We'll propagate the original failure.
136-
}
137-
138-
throw e;
139-
}
140-
141129
try {
142130
startSession(capabilities);
143131
} catch (RuntimeException e) {
@@ -259,48 +247,6 @@ protected void startSession(Capabilities capabilities) {
259247
sessionId = new SessionId(response.getSessionId());
260248
}
261249

262-
/**
263-
* Method called before {@link #startSession(Capabilities) starting a new session}. The default
264-
* implementation is a no-op, but subtypes should override this method to define custom behavior.
265-
*
266-
* @deprecated No longer used, as behaviour is now in {@link CommandExecutor} instances.
267-
*/
268-
@Deprecated
269-
protected void startClient() {
270-
}
271-
272-
/**
273-
* Method called before {@link #startSession(Capabilities) starting a new session}. The default
274-
* implementation is a no-op, but subtypes should override this method to define custom behavior.
275-
*
276-
* @deprecated No longer used, as behaviour is now in {@link CommandExecutor} instances.
277-
*/
278-
@Deprecated
279-
protected void startClient(Capabilities capabilities) {
280-
startClient();
281-
}
282-
283-
/**
284-
* Method called after executing a {@link #quit()} command. The default implementation is a no-op,
285-
* but subtypes should override this method to define custom behavior.
286-
*
287-
* @deprecated No longer used, as behaviour is now in {@link CommandExecutor} instances.
288-
*/
289-
@Deprecated
290-
protected void stopClient() {
291-
}
292-
293-
/**
294-
* Method called after executing a {@link #quit()} command. The default implementation is a no-op,
295-
* but subtypes should override this method to define custom behavior.
296-
*
297-
* @deprecated No longer used, as behaviour is now in {@link CommandExecutor} instances.
298-
*/
299-
@Deprecated
300-
protected void stopClient(Capabilities capabilities) {
301-
stopClient();
302-
}
303-
304250
public ErrorHandler getErrorHandler() {
305251
return errorHandler;
306252
}
@@ -497,7 +443,6 @@ public void quit() {
497443
execute(DriverCommand.QUIT);
498444
} finally {
499445
sessionId = null;
500-
stopClient();
501446
}
502447
}
503448

java/client/test/org/openqa/selenium/remote/RemoteWebDriverInitializationTest.java

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -40,20 +40,8 @@
4040

4141
@RunWith(JUnit4.class)
4242
public class RemoteWebDriverInitializationTest {
43-
private boolean stopClientCalled = false;
4443
private boolean quitCalled = false;
4544

46-
@Test
47-
public void testStopsClientIfStartClientFails() {
48-
Throwable ex = TestUtilities.catchThrowable(
49-
() -> new BadStartClientRemoteWebDriver(mock(CommandExecutor.class),
50-
new ImmutableCapabilities()));
51-
52-
assertNotNull(ex);
53-
assertThat(ex.getMessage(), containsString("Stub client that should fail"));
54-
assertTrue(stopClientCalled);
55-
}
56-
5745
@Test
5846
public void testQuitsIfStartSessionFails() {
5947
Throwable ex = TestUtilities.catchThrowable(
@@ -75,23 +63,6 @@ public void canHandleNonStandardCapabilitiesReturnedByRemoteEnd() throws IOExcep
7563
assertThat(driver.getCapabilities().getCapability("platform"), equalTo(Platform.UNIX));
7664
}
7765

78-
private class BadStartClientRemoteWebDriver extends RemoteWebDriver {
79-
public BadStartClientRemoteWebDriver(CommandExecutor executor,
80-
Capabilities desiredCapabilities) {
81-
super(executor, desiredCapabilities);
82-
}
83-
84-
@Override
85-
protected void startClient() {
86-
throw new RuntimeException("Stub client that should fail");
87-
}
88-
89-
@Override
90-
protected void stopClient() {
91-
stopClientCalled = true;
92-
}
93-
}
94-
9566
private class BadStartSessionRemoteWebDriver extends RemoteWebDriver {
9667
public BadStartSessionRemoteWebDriver(CommandExecutor executor,
9768
Capabilities desiredCapabilities) {

0 commit comments

Comments
 (0)