#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "extensions/common/features/simple_feature.h"
#include <stddef.h>
#include <memory>
#include <string>
#include <vector>
#include "base/command_line.h"
#include "base/strings/stringprintf.h"
#include "base/test/bind.h"
#include "base/test/scoped_command_line.h"
#include "base/test/scoped_feature_list.h"
#include "base/values.h"
#include "content/public/common/content_features.h"
#include "content/public/test/test_utils.h"
#include "extensions/common/extension_builder.h"
#include "extensions/common/extension_features.h"
#include "extensions/common/extension_id.h"
#include "extensions/common/features/complex_feature.h"
#include "extensions/common/features/feature.h"
#include "extensions/common/features/feature_channel.h"
#include "extensions/common/features/feature_developer_mode_only.h"
#include "extensions/common/features/feature_flags.h"
#include "extensions/common/features/feature_session_type.h"
#include "extensions/common/manifest.h"
#include "extensions/common/manifest_handlers/background_info.h"
#include "extensions/common/mojom/context_type.mojom.h"
#include "extensions/common/switches.h"
#include "extensions/test/test_context_data.h"
#include "testing/gtest/include/gtest/gtest.h"
ManifestLocation;
Channel;
namespace extensions {
namespace {
struct IsAvailableTestData { … };
struct FeatureSessionTypeTestData { … };
Feature::AvailabilityResult IsAvailableInChannel(Channel channel_for_feature,
Channel channel_for_testing) { … }
}
class SimpleFeatureTest : public testing::Test { … };
TEST_F(SimpleFeatureTest, IsAvailableNullCase) { … }
TEST_F(SimpleFeatureTest, Allowlist) { … }
TEST_F(SimpleFeatureTest, HashedIdAllowlist) { … }
TEST_F(SimpleFeatureTest, Blocklist) { … }
TEST_F(SimpleFeatureTest, HashedIdBlocklist) { … }
TEST_F(SimpleFeatureTest, PackageType) { … }
TEST_F(SimpleFeatureTest, Context) { … }
TEST_F(SimpleFeatureTest, SessionType) { … }
TEST_F(SimpleFeatureTest, Location) { … }
TEST_F(SimpleFeatureTest, Platform) { … }
TEST_F(SimpleFeatureTest, ManifestVersion) { … }
TEST_F(SimpleFeatureTest, CommandLineSwitch) { … }
TEST_F(SimpleFeatureTest, FeatureFlags) { … }
TEST_F(SimpleFeatureTest, IsIdInArray) { … }
TEST_F(SimpleFeatureTest, SupportedChannel) { … }
TEST_F(SimpleFeatureTest, SimpleFeatureAvailability) { … }
TEST_F(SimpleFeatureTest, ComplexFeatureAvailability) { … }
TEST(SimpleFeatureUnitTest, TestRequiresDelegatedAvailabilityCheck) { … }
TEST(SimpleFeatureUnitTest, TestChannelsWithoutExtension) { … }
TEST(SimpleFeatureUnitTest, TestAvailableToEnvironment) { … }
TEST(SimpleFeatureUnitTest, TestExperimentalExtensionApisSwitch) { … }
TEST_F(SimpleFeatureTest, EnableRestrictDeveloperModeAPIs) { … }
TEST_F(SimpleFeatureTest, DisableRestrictDeveloperModeAPIs) { … }
TEST(SimpleFeatureUnitTest, DisallowForServiceWorkers) { … }
}