From 4bc3f0448ad1f0a122d0853e8720afa7978273b7 Mon Sep 17 00:00:00 2001 From: Justin McCandless Date: Tue, 17 Jan 2023 15:10:09 -0800 Subject: [PATCH] Trying to fix the problem with corrupted message in the tests --- lib/web_ui/lib/src/engine/platform_dispatcher.dart | 4 ++-- lib/web_ui/test/engine/platform_dispatcher_test.dart | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/web_ui/lib/src/engine/platform_dispatcher.dart b/lib/web_ui/lib/src/engine/platform_dispatcher.dart index 1a73f6105dfca..f984a17159999 100644 --- a/lib/web_ui/lib/src/engine/platform_dispatcher.dart +++ b/lib/web_ui/lib/src/engine/platform_dispatcher.dart @@ -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; diff --git a/lib/web_ui/test/engine/platform_dispatcher_test.dart b/lib/web_ui/test/engine/platform_dispatcher_test.dart index d50db65a831e4..9097c8dd32f81 100644 --- a/lib/web_ui/test/engine/platform_dispatcher_test.dart +++ b/lib/web_ui/test/engine/platform_dispatcher_test.dart @@ -105,7 +105,7 @@ void testMain() { ui.PlatformDispatcher.instance.sendPlatformMessage( 'flutter/contextmenu', codec.encodeMethodCall(const MethodCall( - 'enableContextMenu', + 'ContextMenu.enableContextMenu', )), completer.complete, ); @@ -124,7 +124,7 @@ void testMain() { ui.PlatformDispatcher.instance.sendPlatformMessage( 'flutter/contextmenu', codec.encodeMethodCall(const MethodCall( - 'disableContextMenu', + 'ContextMenu.disableContextMenu', )), completer.complete, );