Skip to content

Commit 97887a7

Browse files
committed
rename
1 parent f8b4a45 commit 97887a7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

java/src/org/openqa/selenium/bidi/module/BrowsingContextInspector.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public class BrowsingContextInspector implements AutoCloseable {
6565
}
6666
};
6767

68-
private final Function<Map<String, Object>, DownloadEnded> downloadWillEndMapper =
68+
private final Function<Map<String, Object>, DownloadEnded> downloadEndMapper =
6969
params -> {
7070
try (StringReader reader = new StringReader(JSON.toJson(params));
7171
JsonInput input = JSON.newInput(reader)) {
@@ -94,8 +94,8 @@ public class BrowsingContextInspector implements AutoCloseable {
9494
private final Event<DownloadInfo> downloadWillBeginEvent =
9595
new Event<>("browsingContext.downloadWillBegin", downloadWillBeginMapper);
9696

97-
private final Event<DownloadEnded> downloadWillEndEvent =
98-
new Event<>("browsingContext.downloadEnd", downloadWillEndMapper);
97+
private final Event<DownloadEnded> downloadEndEvent =
98+
new Event<>("browsingContext.downloadEnd", downloadEndMapper);
9999

100100
private final Event<UserPromptOpened> userPromptOpened =
101101
new Event<>(
@@ -179,9 +179,9 @@ public void onDownloadWillBegin(Consumer<DownloadInfo> consumer) {
179179

180180
public void onDownloadEnd(Consumer<DownloadEnded> consumer) {
181181
if (browsingContextIds.isEmpty()) {
182-
this.bidi.addListener(downloadWillEndEvent, consumer);
182+
this.bidi.addListener(downloadEndEvent, consumer);
183183
} else {
184-
this.bidi.addListener(browsingContextIds, downloadWillEndEvent, consumer);
184+
this.bidi.addListener(browsingContextIds, downloadEndEvent, consumer);
185185
}
186186
}
187187

@@ -241,7 +241,7 @@ public void close() {
241241
this.bidi.clearListener(userPromptClosed);
242242
this.bidi.clearListener(historyUpdated);
243243
this.bidi.clearListener(downloadWillBeginEvent);
244-
this.bidi.clearListener(downloadWillEndEvent);
244+
this.bidi.clearListener(downloadEndEvent);
245245

246246
navigationEventSet.forEach(this.bidi::clearListener);
247247
}

0 commit comments

Comments
 (0)