#include "extensions/renderer/api/messaging/native_renderer_messaging_service.h"
#include <memory>
#include "base/memory/raw_ptr.h"
#include "base/run_loop.h"
#include "base/strings/stringprintf.h"
#include "base/test/bind.h"
#include "base/test/gmock_callback_support.h"
#include "base/values.h"
#include "components/crx_file/id_util.h"
#include "content/public/common/content_constants.h"
#include "extensions/common/api/messaging/messaging_endpoint.h"
#include "extensions/common/extension.h"
#include "extensions/common/extension_builder.h"
#include "extensions/common/mojom/context_type.mojom.h"
#include "extensions/common/mojom/message_port.mojom-shared.h"
#include "extensions/renderer/api/messaging/message_target.h"
#include "extensions/renderer/api/messaging/messaging_util.h"
#include "extensions/renderer/api/messaging/mock_message_port_host.h"
#include "extensions/renderer/bindings/api_binding_test_util.h"
#include "extensions/renderer/bindings/api_binding_types.h"
#include "extensions/renderer/bindings/api_response_validator.h"
#include "extensions/renderer/native_extension_bindings_system.h"
#include "extensions/renderer/native_extension_bindings_system_test_base.h"
#include "extensions/renderer/script_context.h"
#include "extensions/renderer/script_context_set.h"
namespace extensions {
namespace {
class RuntimeMessageValidationIgnorer { … };
}
class NativeRendererMessagingServiceTest
: public NativeExtensionBindingsSystemUnittest { … };
TEST_F(NativeRendererMessagingServiceTest, OpenMessagePort) { … }
TEST_F(NativeRendererMessagingServiceTest, DeliverMessageToPort) { … }
TEST_F(NativeRendererMessagingServiceTest, DisconnectMessagePort) { … }
TEST_F(NativeRendererMessagingServiceTest, PostMessageFromJS) { … }
TEST_F(NativeRendererMessagingServiceTest, DisconnectFromJS) { … }
TEST_F(NativeRendererMessagingServiceTest, Connect) { … }
TEST_F(NativeRendererMessagingServiceTest, SendOneTimeMessageWithCallback) { … }
TEST_F(NativeRendererMessagingServiceTest, SendOneTimeMessageWithPromise) { … }
TEST_F(NativeRendererMessagingServiceTest, ReceiveOneTimeMessage) { … }
TEST_F(NativeRendererMessagingServiceTest, TestExternalOneTimeMessages) { … }
}