#include "chrome/browser/extensions/api/messaging/native_messaging_launch_from_native.h"
#include <memory>
#include <utility>
#include "base/memory/raw_ptr.h"
#include "base/path_service.h"
#include "base/test/values_test_util.h"
#include "base/values.h"
#include "chrome/browser/extensions/api/messaging/native_messaging_test_util.h"
#include "chrome/test/base/testing_profile.h"
#include "components/version_info/version_info.h"
#include "content/public/test/browser_task_environment.h"
#include "extensions/browser/event_router.h"
#include "extensions/browser/event_router_factory.h"
#include "extensions/browser/extension_prefs.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/common/extension_id.h"
#include "extensions/common/extension_paths.h"
#include "extensions/common/features/feature_channel.h"
#include "extensions/common/manifest_constants.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace extensions {
namespace {
class MockEventRouter : public EventRouter { … };
std::unique_ptr<KeyedService> BuildMockEventRouter(
const bool* has_listener_result,
content::BrowserContext* context) { … }
class ExtensionSupportsConnectionFromNativeAppTest : public ::testing::Test { … };
TEST_F(ExtensionSupportsConnectionFromNativeAppTest, Success) { … }
TEST_F(ExtensionSupportsConnectionFromNativeAppTest, NoOnConnectNative) { … }
TEST_F(ExtensionSupportsConnectionFromNativeAppTest, OffTheRecordProfile) { … }
TEST_F(ExtensionSupportsConnectionFromNativeAppTest, NotNativelyConnectable) { … }
TEST_F(ExtensionSupportsConnectionFromNativeAppTest, NotTransientBackground) { … }
TEST_F(ExtensionSupportsConnectionFromNativeAppTest, NotNativeMessaging) { … }
TEST_F(ExtensionSupportsConnectionFromNativeAppTest, NativeMessagingOnly) { … }
TEST_F(ExtensionSupportsConnectionFromNativeAppTest, TransientBackgroundOnly) { … }
TEST_F(ExtensionSupportsConnectionFromNativeAppTest, NativelyConnectableOnly) { … }
TEST_F(ExtensionSupportsConnectionFromNativeAppTest, NoPermissions) { … }
TEST_F(ExtensionSupportsConnectionFromNativeAppTest, UnknownExtension) { … }
}
}