Skip to content

Commit

Permalink
Trying to fix the problem with corrupted message in the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
justinmc committed Jan 17, 2023
1 parent 4ace58d commit 4bc3f04
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/web_ui/lib/src/engine/platform_dispatcher.dart
Original file line number Diff line number Diff line change
Expand Up @@ -534,11 +534,11 @@ class EnginePlatformDispatcher extends ui.PlatformDispatcher {
const MethodCodec codec = StandardMethodCodec();
final MethodCall decoded = codec.decodeMethodCall(data);
switch (decoded.method) {
case 'enableContextMenu':
case 'ContextMenu.enableContextMenu':
flutterViewEmbedder.enableContextMenu();
replyToPlatformMessage(callback, codec.encodeSuccessEnvelope(true));
return;
case 'disableContextMenu':
case 'ContextMenu.disableContextMenu':
flutterViewEmbedder.disableContextMenu();
replyToPlatformMessage(callback, codec.encodeSuccessEnvelope(true));
return;
Expand Down
4 changes: 2 additions & 2 deletions lib/web_ui/test/engine/platform_dispatcher_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ void testMain() {
ui.PlatformDispatcher.instance.sendPlatformMessage(
'flutter/contextmenu',
codec.encodeMethodCall(const MethodCall(
'enableContextMenu',
'ContextMenu.enableContextMenu',
)),
completer.complete,
);
Expand All @@ -124,7 +124,7 @@ void testMain() {
ui.PlatformDispatcher.instance.sendPlatformMessage(
'flutter/contextmenu',
codec.encodeMethodCall(const MethodCall(
'disableContextMenu',
'ContextMenu.disableContextMenu',
)),
completer.complete,
);
Expand Down

0 comments on commit 4bc3f04

Please sign in to comment.