Skip to content

Commit bb96962

Browse files
committed
Try first iteration of changes to work on CI
1 parent 6955aa9 commit bb96962

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

common/src/web/fedcm/fedcm_async.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
<script>
1111
// Use a relative path for the configURL
12-
let configURL = `http://${location.host}/fedcm/config.json`;
12+
let configURL = `https://${location.host}/fedcm/config.json`;
1313
console.log(configURL)
1414
let result = null;
1515

java/test/org/openqa/selenium/federatedcredentialmanagement/FederatedCredentialManagementTest.java

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
import static org.junit.jupiter.api.Assertions.assertThrows;
2424
import static org.openqa.selenium.testing.drivers.Browser.CHROME;
2525

26+
import java.net.MalformedURLException;
27+
import java.net.URL;
2628
import java.time.Duration;
2729
import java.util.List;
2830
import org.junit.jupiter.api.AfterEach;
@@ -42,18 +44,32 @@ class FederatedCredentialManagementTest {
4244

4345
private HasFederatedCredentialManagement fedcmDriver;
4446
private WebDriver localDriver;
45-
InProcessTestEnvironment environment = new InProcessTestEnvironment(false);
47+
InProcessTestEnvironment environment = new InProcessTestEnvironment(true);
4648
AppServer appServer = environment.getAppServer();
4749

4850
@BeforeEach
4951
public void setup() {
5052
ChromeOptions options = (ChromeOptions) CHROME.getCapabilities();
5153
options.setAcceptInsecureCerts(true);
54+
options.addArguments(
55+
String.format("host-resolver-rules=MAP localhost:443 localhost:%d", getSecurePort()));
56+
options.addArguments("ignore-certificate-errors");
57+
options.addArguments("--enable-fedcm-without-well-known-enforcement");
5258
localDriver = new ChromeDriver(options);
5359

5460
assumeThat(localDriver).isInstanceOf(HasFederatedCredentialManagement.class);
5561
fedcmDriver = (HasFederatedCredentialManagement) localDriver;
56-
localDriver.get(appServer.whereIs("/fedcm/fedcm_async.html"));
62+
localDriver.get(appServer.whereIsSecure("/fedcm/fedcm_async.html"));
63+
}
64+
65+
private int getSecurePort() {
66+
String urlString = appServer.whereIsSecure("/");
67+
try {
68+
return new URL(urlString).getPort();
69+
} catch (MalformedURLException ex) {
70+
// This should not happen.
71+
return 0;
72+
}
5773
}
5874

5975
@AfterEach

0 commit comments

Comments
 (0)