Skip to content

Commit 9e20c44

Browse files
committed
Run format script. No logical changes
1 parent 1337b20 commit 9e20c44

File tree

2 files changed

+27
-25
lines changed

2 files changed

+27
-25
lines changed

java/src/org/openqa/selenium/bidi/browsingcontext/BrowsingContext.java

+11-9
Original file line numberDiff line numberDiff line change
@@ -161,25 +161,27 @@ public List<BrowsingContextInfo> getTopLevelContexts() {
161161
}
162162

163163
public NavigationResult reload() {
164-
return this.bidi.send(new Command<>(RELOAD, ImmutableMap.of(CONTEXT, id), navigationInfoMapper));
164+
return this.bidi.send(
165+
new Command<>(RELOAD, ImmutableMap.of(CONTEXT, id), navigationInfoMapper));
165166
}
166167

167168
// Yet to be implemented by browser vendors
168169
private NavigationResult reload(boolean ignoreCache) {
169-
return this.bidi.send(new Command<>(
170-
RELOAD,
171-
ImmutableMap.of(CONTEXT, id, "ignoreCache", ignoreCache),
172-
navigationInfoMapper));
170+
return this.bidi.send(
171+
new Command<>(
172+
RELOAD,
173+
ImmutableMap.of(CONTEXT, id, "ignoreCache", ignoreCache),
174+
navigationInfoMapper));
173175
}
174176

175177
// TODO: Handle timeouts in case of Readiness state "interactive" and "complete".
176178
// Refer https://github.com/w3c/webdriver-bidi/issues/188
177179
public NavigationResult reload(ReadinessState readinessState) {
178180
return this.bidi.send(
179181
new Command<>(
180-
RELOAD,
181-
ImmutableMap.of(CONTEXT, id, "wait", readinessState.toString()),
182-
navigationInfoMapper));
182+
RELOAD,
183+
ImmutableMap.of(CONTEXT, id, "wait", readinessState.toString()),
184+
navigationInfoMapper));
183185
}
184186

185187
// Yet to be implemented by browser vendors
@@ -198,7 +200,7 @@ public void handleUserPrompt() {
198200

199201
public void handleUserPrompt(boolean accept) {
200202
this.bidi.send(
201-
new Command<>(HANDLE_USER_PROMPT, ImmutableMap.of(CONTEXT, id, "accept", accept)));
203+
new Command<>(HANDLE_USER_PROMPT, ImmutableMap.of(CONTEXT, id, "accept", accept)));
202204
}
203205

204206
public void handleUserPrompt(String userText) {

java/test/org/openqa/selenium/bidi/browsingcontext/BrowsingContextTest.java

+16-16
Original file line numberDiff line numberDiff line change
@@ -351,26 +351,26 @@ void canCaptureScreenshot() {
351351

352352
private String alertPage() {
353353
return appServer.create(
354-
new Page()
355-
.withTitle("Testing Alerts")
356-
.withBody(
357-
"<a href='#' id='alert' onclick='alert(\"works\");'>click me</a>"));
354+
new Page()
355+
.withTitle("Testing Alerts")
356+
.withBody("<a href='#' id='alert' onclick='alert(\"works\");'>click me</a>"));
358357
}
359358

360359
private String promptPage() {
361360
return appServer.create(
362-
new Page()
363-
.withTitle("Testing Alerts")
364-
.withScripts(
365-
"function myFunction() {",
366-
" let message = prompt('Please enter a message');",
367-
" if (message != null) {",
368-
" document.getElementById('result').innerHTML =",
369-
" 'Message: ' + message ;",
370-
" }",
371-
"}")
372-
.withBody("<button id='alert' onclick='myFunction()'>Try it</button>",
373-
"<p id=\"result\"></p>"));
361+
new Page()
362+
.withTitle("Testing Alerts")
363+
.withScripts(
364+
"function myFunction() {",
365+
" let message = prompt('Please enter a message');",
366+
" if (message != null) {",
367+
" document.getElementById('result').innerHTML =",
368+
" 'Message: ' + message ;",
369+
" }",
370+
"}")
371+
.withBody(
372+
"<button id='alert' onclick='myFunction()'>Try it</button>",
373+
"<p id=\"result\"></p>"));
374374
}
375375

376376
@AfterEach

0 commit comments

Comments
 (0)