Skip to content

Commit c210a0e

Browse files
Merge branch 'trunk' into ini-file-reader
2 parents 4ee76ef + 983a43e commit c210a0e

File tree

72 files changed

+669
-132
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+669
-132
lines changed

.skipped-tests

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
-//java/test/org/openqa/selenium/edge:EdgeDriverFunctionalTest
66
-//java/test/org/openqa/selenium/edge:EdgeDriverFunctionalTest-edge
77
-//java/test/org/openqa/selenium/edge:EdgeDriverFunctionalTest-remote
8-
-//java/test/org/openqa/selenium/federatedcredentialmanagement:FederatedCredentialManagementTest
98
-//java/test/org/openqa/selenium/firefox:FirefoxDriverBuilderTest
109
-//java/test/org/openqa/selenium/grid/gridui:OverallGridTest
1110
-//java/test/org/openqa/selenium/grid/router:RemoteWebDriverDownloadTest
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"accounts_endpoint": "accounts.json",
33
"client_metadata_endpoint": "client_metadata.json",
4-
"id_assertion_endpoint": "id_assertion",
5-
"signin_url": "/signin",
6-
"login_url": "/login"
4+
"id_assertion_endpoint": "id_assertion.json",
5+
"signin_url": "signin",
6+
"login_url": "login"
77
}

common/src/web/fedcm/fedcm.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<script>
33

4-
let configURL = `http://${location.host}/fedcm/fedcm.json`;
4+
let configURL = `http://${location.host}/fedcm/config.json`;
55
let promise = null;
66

77
function triggerFedCm() {
@@ -17,4 +17,4 @@
1717
return promise;
1818
}
1919

20-
</script>
20+
</script>
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>FedCM Example</title>
5+
</head>
6+
<body>
7+
<button id="triggerButton" onclick="triggerFedCm()">Trigger FedCM</button>
8+
<div id="result"></div>
9+
10+
<script>
11+
// Use a relative path for the configURL
12+
let configURL = `https://${location.host}/fedcm/config.json`;
13+
console.log(configURL)
14+
let result = null;
15+
16+
async function triggerFedCm() {
17+
console.log("Config URL:", configURL);
18+
try {
19+
let promise = await navigator.credentials.get({
20+
identity: {
21+
providers: [{
22+
configURL: configURL,
23+
clientId: '1',
24+
}]
25+
}
26+
});
27+
result = promise;
28+
document.getElementById('result').innerText = JSON.stringify(result);
29+
} catch (error) {
30+
console.error("FedCM Error:", error);
31+
result = { error: error.message };
32+
document.getElementById('result').innerText = JSON.stringify(result);
33+
}
34+
}
35+
</script>
36+
</body>
37+
</html>

common/src/web/fedcm/login.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Login</title>
5+
</head>
6+
<body>
7+
<h1>Login Page</h1>
8+
<p>Login successful! This is a placeholder for the login process.</p>
9+
<a href="/">Return to Home</a>
10+
</body>
11+
</html>

common/src/web/fedcm/signin.html

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Sign In</title>
5+
</head>
6+
<body>
7+
<h1>Sign In Page</h1>
8+
<p>This is a placeholder for the sign-in page.</p>
9+
<form action="/signin" method="post">
10+
<label for="username">Username:</label>
11+
<input type="text" id="username" name="username" required>
12+
<br><br>
13+
<label for="password">Password:</label>
14+
<input type="password" id="password" name="password" required>
15+
<br><br>
16+
<button type="submit">Sign In</button>
17+
</form>
18+
</body>
19+
</html>
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<html>
2+
<body>
3+
<style>
4+
.information {
5+
background-color: white;
6+
color: black;
7+
padding: 10px;
8+
}
9+
</style>
10+
<h2>Contact Selenium</h2>
11+
12+
<form>
13+
<input type="radio" name="gender" value="m" />Male &nbsp;
14+
<input type="radio" name="gender" value="f" />Female <br>
15+
<br>
16+
<label for="fname">First name:</label><br>
17+
<input class="information" type="text" id="fname" name="fname" value="Jane"><br><br>
18+
<label for="lname">Last name:</label><br>
19+
<input class="information" type="text" id="lname" name="lname" value="Doe"><br><br>
20+
<label for="newsletter">Newsletter:</label>
21+
<input type="checkbox" name="newsletter" value="1" /><br><br>
22+
<input type="submit" value="Submit">
23+
</form>
24+
25+
<p>To know more about Selenium, visit the official page
26+
<a href ="https://www.selenium.dev/">Selenium Official Page</a>
27+
</p>
28+
29+
</body>
30+
</html>

java/src/org/openqa/selenium/Architecture.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717

1818
package org.openqa.selenium;
1919

20+
import java.util.Locale;
21+
2022
/**
2123
* Represents the known architectures used in WebDriver. It attempts to smooth over some of Java's
2224
* rough edges when dealing with microprocessor architectures by, for instance, allowing you to
@@ -98,7 +100,7 @@ public int getDataModel() {
98100

99101
@Override
100102
public String toString() {
101-
return name().toLowerCase();
103+
return name().toLowerCase(Locale.ENGLISH);
102104
}
103105

104106
/**
@@ -121,7 +123,7 @@ public static Architecture getCurrent() {
121123
*/
122124
public static Architecture extractFromSysProperty(String arch) {
123125
if (arch != null) {
124-
arch = arch.toLowerCase();
126+
arch = arch.toLowerCase(Locale.ENGLISH);
125127
}
126128

127129
// Some architectures are basically the same even though they have different names. ia32, x86,

java/src/org/openqa/selenium/Platform.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
package org.openqa.selenium;
1919

2020
import java.util.Arrays;
21+
import java.util.Locale;
2122
import java.util.regex.Matcher;
2223
import java.util.regex.Pattern;
2324

@@ -414,7 +415,7 @@ public static Platform extractFromSysProperty(String osName) {
414415
* @return the most likely platform based on given operating system name and version
415416
*/
416417
public static Platform extractFromSysProperty(String osName, String osVersion) {
417-
osName = osName.toLowerCase();
418+
osName = osName.toLowerCase(Locale.ENGLISH);
418419
// os.name for android is linux
419420
if ("dalvik".equalsIgnoreCase(System.getProperty("java.vm.name"))) {
420421
return Platform.ANDROID;
@@ -434,7 +435,7 @@ public static Platform extractFromSysProperty(String osName, String osVersion) {
434435
if ("".equals(matcher)) {
435436
continue;
436437
}
437-
matcher = matcher.toLowerCase();
438+
matcher = matcher.toLowerCase(Locale.ENGLISH);
438439
if (os.isExactMatch(osName, matcher)) {
439440
return os;
440441
}

java/src/org/openqa/selenium/Proxy.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import java.util.Arrays;
2121
import java.util.HashMap;
2222
import java.util.List;
23+
import java.util.Locale;
2324
import java.util.Map;
2425
import java.util.Objects;
2526
import java.util.Optional;
@@ -93,7 +94,8 @@ public Proxy() {
9394
public Proxy(Map<String, ?> raw) {
9495
Map<String, Consumer<Object>> setters = new HashMap<>();
9596
setters.put(
96-
PROXY_TYPE, value -> setProxyType(ProxyType.valueOf(((String) value).toUpperCase())));
97+
PROXY_TYPE,
98+
value -> setProxyType(ProxyType.valueOf(((String) value).toUpperCase(Locale.ENGLISH))));
9799
setters.put(FTP_PROXY, value -> setFtpProxy((String) value));
98100
setters.put(HTTP_PROXY, value -> setHttpProxy((String) value));
99101
setters.put(
@@ -448,7 +450,7 @@ public String toString() {
448450
case DIRECT:
449451
case MANUAL:
450452
case SYSTEM:
451-
builder.append(getProxyType().toString().toLowerCase());
453+
builder.append(getProxyType().toString().toLowerCase(Locale.ENGLISH));
452454
break;
453455

454456
case PAC:

0 commit comments

Comments
 (0)