Skip to content

Commit

Permalink
add comments to calls to webSocketHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
devoncarew committed Dec 3, 2024
1 parent ed95cf6 commit 7695df0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkgs/test/lib/src/runner/browser/compilers/dart2js.dart
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ class Dart2JsSupport extends CompilerSupport with JsHtmlWrapper {
@override
(Uri, Future<WebSocketChannel>) get webSocket {
var completer = Completer<WebSocketChannel>.sync();
// Note: the WebSocketChannel type below is needed for compatibility with
// package:shelf_web_socket v2.
var path =
_webSocketHandler.create(webSocketHandler((WebSocketChannel ws, _) {
completer.complete(ws);
Expand Down
2 changes: 2 additions & 0 deletions pkgs/test/lib/src/runner/browser/compilers/dart2wasm.dart
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ class Dart2WasmSupport extends CompilerSupport with WasmHtmlWrapper {
@override
(Uri, Future<WebSocketChannel>) get webSocket {
var completer = Completer<WebSocketChannel>.sync();
// Note: the WebSocketChannel type below is needed for compatibility with
// package:shelf_web_socket v2.
var path =
_webSocketHandler.create(webSocketHandler((WebSocketChannel ws, _) {
completer.complete(ws);
Expand Down
2 changes: 2 additions & 0 deletions pkgs/test/lib/src/runner/browser/compilers/precompiled.dart
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ abstract class PrecompiledSupport extends CompilerSupport {
@override
(Uri, Future<WebSocketChannel>) get webSocket {
var completer = Completer<WebSocketChannel>.sync();
// Note: the WebSocketChannel type below is needed for compatibility with
// package:shelf_web_socket v2.
var path =
_webSocketHandler.create(webSocketHandler((WebSocketChannel ws, _) {
completer.complete(ws);
Expand Down
2 changes: 2 additions & 0 deletions pkgs/test/test/runner/browser/code_server.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ class CodeServer {
/// future that will complete to the WebSocket.
Future<WebSocketChannel> handleWebSocket() {
var completer = Completer<WebSocketChannel>();
// Note: the WebSocketChannel type below is needed for compatibility with
// package:shelf_web_socket v2.
_handler.expect('GET', '/', webSocketHandler((WebSocketChannel ws, _) {
completer.complete(ws);
}));
Expand Down

0 comments on commit 7695df0

Please sign in to comment.