#include "chrome/renderer/extensions/api/tabs_hooks_delegate.h"
#include "base/memory/raw_ptr.h"
#include "base/strings/stringprintf.h"
#include "extensions/common/extension_builder.h"
#include "extensions/common/mojom/context_type.mojom.h"
#include "extensions/renderer/api/messaging/message_target.h"
#include "extensions/renderer/api/messaging/messaging_util.h"
#include "extensions/renderer/api/messaging/native_renderer_messaging_service.h"
#include "extensions/renderer/api/messaging/send_message_tester.h"
#include "extensions/renderer/bindings/api_binding_test_util.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"
namespace extensions {
namespace {
void CallAPIAndExpectError(v8::Local<v8::Context> context,
const char* method_name,
const char* args) { … }
}
class TabsHooksDelegateTest : public NativeExtensionBindingsSystemUnittest { … };
TEST_F(TabsHooksDelegateTest, Connect) { … }
TEST_F(TabsHooksDelegateTest, SendMessage) { … }
TEST_F(TabsHooksDelegateTest, SendRequest) { … }
class TabsHooksDelegateMV3Test : public TabsHooksDelegateTest { … };
TEST_F(TabsHooksDelegateMV3Test, SendMessageUsingPromise) { … }
}