#include <stddef.h>
#include <memory>
#include "base/command_line.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/public/browser/storage_partition.h"
#include "content/public/common/content_features.h"
#include "content/public/test/browser_test.h"
#include "extensions/browser/api/declarative/rules_registry_service.h"
#include "extensions/browser/api/declarative_webrequest/webrequest_constants.h"
#include "extensions/browser/api/declarative_webrequest/webrequest_rules_registry.h"
#include "extensions/browser/extension_prefs.h"
#include "extensions/common/extension.h"
#include "extensions/test/extension_test_message_listener.h"
#include "extensions/test/test_extension_dir.h"
namespace extensions {
namespace {
const char kArbitraryUrl[] = …;
#define TEST_TITLE_STRING …
const char kTestTitle[] = …;
std::string GetRedirectToDataManifestWithVersion(unsigned version) { … }
const char kRedirectToDataConstants[] = …;
#undef TEST_TITLE_STRING
const char kRedirectToDataRules[] = …;
const char kRedirectToDataInstallRules[] = …;
const char kRedirectToDataNoRules[] = …;
}
class DeclarativeApiTest : public ExtensionApiTest { … };
IN_PROC_BROWSER_TEST_F(DeclarativeApiTest, DeclarativeApi) { … }
IN_PROC_BROWSER_TEST_F(DeclarativeApiTest, PRE_PersistRules) { … }
IN_PROC_BROWSER_TEST_F(DeclarativeApiTest, PersistRules) { … }
IN_PROC_BROWSER_TEST_F(DeclarativeApiTest, ExtensionLifetimeRulesHandling) { … }
IN_PROC_BROWSER_TEST_F(DeclarativeApiTest, NoTracesAfterUninstalling) { … }
}