#include <string_view>
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/json/json_file_value_serializer.h"
#include "base/strings/pattern.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "extensions/common/api/declarative_net_request.h"
#include "extensions/common/api/declarative_net_request/constants.h"
#include "extensions/common/api/declarative_net_request/dnr_manifest_data.h"
#include "extensions/common/api/declarative_net_request/test_utils.h"
#include "extensions/common/constants.h"
#include "extensions/common/error_utils.h"
#include "extensions/common/extension.h"
#include "extensions/common/file_util.h"
#include "extensions/common/manifest_constants.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace extensions {
errors;
dnr_api;
namespace declarative_net_request {
namespace {
std::string GetRuleResourcesPath() { … }
class DNRManifestTest : public testing::Test { … };
TEST_F(DNRManifestTest, EmptyRuleset) { … }
TEST_F(DNRManifestTest, InvalidManifestKey) { … }
TEST_F(DNRManifestTest, InvalidRulesFileKey) { … }
TEST_F(DNRManifestTest, InvalidRulesFileFormat) { … }
TEST_F(DNRManifestTest, InvalidRulesetPath) { … }
TEST_F(DNRManifestTest, InvalidRulesetPath2) { … }
TEST_F(DNRManifestTest, ZeroRulesets) { … }
TEST_F(DNRManifestTest, MultipleRulesFileSuccess) { … }
TEST_F(DNRManifestTest, MultipleRulesFileInvalidPath) { … }
TEST_F(DNRManifestTest, RulesetCountExceeded) { … }
TEST_F(DNRManifestTest, EnabledRulesetCountExceeded) { … }
TEST_F(DNRManifestTest, NonExistentRulesFile) { … }
TEST_F(DNRManifestTest, NeedsDeclarativeNetRequestPermission) { … }
TEST_F(DNRManifestTest, RulesFileInNestedDirectory) { … }
TEST_F(DNRManifestTest, EmptyRulesetID) { … }
TEST_F(DNRManifestTest, DuplicateRulesetID) { … }
TEST_F(DNRManifestTest, ReservedRulesetID) { … }
TEST_F(DNRManifestTest, EmptyExtensionRootPath) { … }
TEST_F(DNRManifestTest, EmptyRulesetPath1) { … }
TEST_F(DNRManifestTest, EmptyRulesetPath2) { … }
TEST_F(DNRManifestTest, DuplicateRulesetPath) { … }
}
}
}