#include "extensions/renderer/api/messaging/gin_port.h"
#include <optional>
#include <string_view>
#include "base/feature_list.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "content/public/common/content_features.h"
#include "extensions/common/api/messaging/message.h"
#include "extensions/common/api/messaging/port_id.h"
#include "extensions/common/mojom/message_port.mojom-shared.h"
#include "extensions/renderer/bindings/api_binding_test.h"
#include "extensions/renderer/bindings/api_binding_test_util.h"
#include "extensions/renderer/bindings/api_event_handler.h"
#include "gin/data_object_builder.h"
#include "gin/handle.h"
#include "testing/gmock/include/gmock/gmock.h"
namespace extensions {
namespace {
const char kDefaultPortName[] = …;
class TestPortDelegate : public GinPort::Delegate { … };
class GinPortTest : public APIBindingTest { … };
}
TEST_F(GinPortTest, TestGetName) { … }
TEST_F(GinPortTest, TestDispatchMessage) { … }
TEST_F(GinPortTest, TestPostMessage) { … }
TEST_F(GinPortTest, TestNativeDisconnect) { … }
TEST_F(GinPortTest, TestJSDisconnect) { … }
TEST_F(GinPortTest, JSDisconnectFromOnDisconnect) { … }
TEST_F(GinPortTest, JSPostMessageFromOnDisconnect) { … }
TEST_F(GinPortTest, TestSenderProperty) { … }
TEST_F(GinPortTest, TryUsingPortAfterInvalidation) { … }
TEST_F(GinPortTest, AlteringPortName) { … }
}