From 9e20c44f083ff8d24177c17965121a349e8e086c Mon Sep 17 00:00:00 2001 From: Simon Mavi Stewart Date: Fri, 22 Sep 2023 10:34:51 +0100 Subject: [PATCH] Run format script. No logical changes --- .../bidi/browsingcontext/BrowsingContext.java | 20 ++++++------ .../browsingcontext/BrowsingContextTest.java | 32 +++++++++---------- 2 files changed, 27 insertions(+), 25 deletions(-) diff --git a/java/src/org/openqa/selenium/bidi/browsingcontext/BrowsingContext.java b/java/src/org/openqa/selenium/bidi/browsingcontext/BrowsingContext.java index dd8542e7b6ec1..19e1c54ecf35c 100644 --- a/java/src/org/openqa/selenium/bidi/browsingcontext/BrowsingContext.java +++ b/java/src/org/openqa/selenium/bidi/browsingcontext/BrowsingContext.java @@ -161,15 +161,17 @@ public List getTopLevelContexts() { } public NavigationResult reload() { - return this.bidi.send(new Command<>(RELOAD, ImmutableMap.of(CONTEXT, id), navigationInfoMapper)); + return this.bidi.send( + new Command<>(RELOAD, ImmutableMap.of(CONTEXT, id), navigationInfoMapper)); } // Yet to be implemented by browser vendors private NavigationResult reload(boolean ignoreCache) { - return this.bidi.send(new Command<>( - RELOAD, - ImmutableMap.of(CONTEXT, id, "ignoreCache", ignoreCache), - navigationInfoMapper)); + return this.bidi.send( + new Command<>( + RELOAD, + ImmutableMap.of(CONTEXT, id, "ignoreCache", ignoreCache), + navigationInfoMapper)); } // TODO: Handle timeouts in case of Readiness state "interactive" and "complete". @@ -177,9 +179,9 @@ private NavigationResult reload(boolean ignoreCache) { public NavigationResult reload(ReadinessState readinessState) { return this.bidi.send( new Command<>( - RELOAD, - ImmutableMap.of(CONTEXT, id, "wait", readinessState.toString()), - navigationInfoMapper)); + RELOAD, + ImmutableMap.of(CONTEXT, id, "wait", readinessState.toString()), + navigationInfoMapper)); } // Yet to be implemented by browser vendors @@ -198,7 +200,7 @@ public void handleUserPrompt() { public void handleUserPrompt(boolean accept) { this.bidi.send( - new Command<>(HANDLE_USER_PROMPT, ImmutableMap.of(CONTEXT, id, "accept", accept))); + new Command<>(HANDLE_USER_PROMPT, ImmutableMap.of(CONTEXT, id, "accept", accept))); } public void handleUserPrompt(String userText) { diff --git a/java/test/org/openqa/selenium/bidi/browsingcontext/BrowsingContextTest.java b/java/test/org/openqa/selenium/bidi/browsingcontext/BrowsingContextTest.java index 45cefb6978836..669f3bcfe565b 100644 --- a/java/test/org/openqa/selenium/bidi/browsingcontext/BrowsingContextTest.java +++ b/java/test/org/openqa/selenium/bidi/browsingcontext/BrowsingContextTest.java @@ -351,26 +351,26 @@ void canCaptureScreenshot() { private String alertPage() { return appServer.create( - new Page() - .withTitle("Testing Alerts") - .withBody( - "click me")); + new Page() + .withTitle("Testing Alerts") + .withBody("click me")); } private String promptPage() { return appServer.create( - new Page() - .withTitle("Testing Alerts") - .withScripts( - "function myFunction() {", - " let message = prompt('Please enter a message');", - " if (message != null) {", - " document.getElementById('result').innerHTML =", - " 'Message: ' + message ;", - " }", - "}") - .withBody("", - "

")); + new Page() + .withTitle("Testing Alerts") + .withScripts( + "function myFunction() {", + " let message = prompt('Please enter a message');", + " if (message != null) {", + " document.getElementById('result').innerHTML =", + " 'Message: ' + message ;", + " }", + "}") + .withBody( + "", + "

")); } @AfterEach