Skip to content

Commit

Permalink
[java] Removing deprecated ACCEPT_SSL_CERTS cap
Browse files Browse the repository at this point in the history
  • Loading branch information
diemol committed Dec 7, 2022
1 parent c6795ba commit 7b212ee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
5 changes: 0 additions & 5 deletions java/src/org/openqa/selenium/remote/CapabilityType.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,6 @@ public interface CapabilityType {
*/
@Deprecated
String SUPPORTS_WEB_STORAGE = "webStorageEnabled";
/**
* @deprecated Use {@link CapabilityType#ACCEPT_INSECURE_CERTS}
*/
@Deprecated
String ACCEPT_SSL_CERTS = "acceptSslCerts";
/**
* @deprecated Non W3C compliant
*/
Expand Down
15 changes: 6 additions & 9 deletions java/test/org/openqa/selenium/firefox/FirefoxDriverTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
package org.openqa.selenium.firefox;

import com.google.common.collect.ImmutableMap;

import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;
import org.mockito.ArgumentMatchers;
Expand All @@ -31,7 +32,6 @@
import org.openqa.selenium.ParallelTestRunner;
import org.openqa.selenium.ParallelTestRunner.Worker;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebDriverException;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.build.InProject;
import org.openqa.selenium.remote.CapabilityType;
Expand Down Expand Up @@ -64,16 +64,16 @@

import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import static org.junit.jupiter.api.Assumptions.assumeTrue;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.fail;
import static org.junit.jupiter.api.Assumptions.assumeTrue;
import static org.mockito.Mockito.atLeastOnce;
import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;
import static org.openqa.selenium.WaitingConditions.elementValueToEqual;
import static org.openqa.selenium.remote.CapabilityType.ACCEPT_SSL_CERTS;
import static org.openqa.selenium.remote.CapabilityType.ACCEPT_INSECURE_CERTS;
import static org.openqa.selenium.support.ui.ExpectedConditions.titleIs;
import static org.openqa.selenium.testing.drivers.Browser.FIREFOX;

Expand Down Expand Up @@ -358,13 +358,10 @@ public void shouldBeAbleToPassCommandLineOptions() {

@Test
@NoDriverBeforeTest
public void canBlockInvalidSslCertificates() {
FirefoxProfile profile = new FirefoxProfile();
profile.setAcceptUntrustedCertificates(false);

localDriver = new WebDriverBuilder().get(new FirefoxOptions().setProfile(profile));
public void canBlockInsecureCerts() {
localDriver = new WebDriverBuilder().get(new FirefoxOptions().setAcceptInsecureCerts(false));
Capabilities caps = ((HasCapabilities) localDriver).getCapabilities();
assertThat(caps.is(ACCEPT_SSL_CERTS)).isFalse();
assertThat(caps.is(ACCEPT_INSECURE_CERTS)).isFalse();
}

@Test
Expand Down

0 comments on commit 7b212ee

Please sign in to comment.