#include "chrome/browser/background/background_application_list_model.h"
#include <stddef.h>
#include <cstdlib>
#include <memory>
#include <set>
#include <utility>
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/run_loop.h"
#include "build/build_config.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_service_test_base.h"
#include "chrome/browser/extensions/permissions/permissions_updater.h"
#include "chrome/test/base/testing_profile.h"
#include "extensions/browser/extension_prefs.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extension_system.h"
#include "extensions/browser/test_extension_registry_observer.h"
#include "extensions/browser/uninstall_reason.h"
#include "extensions/common/extension.h"
#include "extensions/common/manifest_constants.h"
#include "extensions/common/permissions/api_permission.h"
#include "extensions/common/permissions/permission_set.h"
#include "extensions/common/permissions/permissions_data.h"
#include "testing/gtest/include/gtest/gtest.h"
#define RANDOM_SEED …
APIPermission;
Extension;
ExtensionRegistry;
ExtensionSystem;
APIPermissionID;
base::FilePath bogus_file_pathname(const std::string& name) { … }
class BackgroundApplicationListModelTest
: public extensions::ExtensionServiceTestBase { … };
enum PushMessagingOption { … };
static scoped_refptr<Extension> CreateExtension(
const std::string& name,
bool background_permission) { … }
namespace {
std::string GenerateUniqueExtensionName() { … }
void AddBackgroundPermission(extensions::ExtensionService* service,
Extension* extension) { … }
void RemoveBackgroundPermission(extensions::ExtensionService* service,
Extension* extension) { … }
}
TEST_F(BackgroundApplicationListModelTest, DISABLED_ExplicitTest) { … }
TEST_F(BackgroundApplicationListModelTest, AddRemovePermissionsTest) { … }
TEST_F(BackgroundApplicationListModelTest, ExtensionLoadAndUnload) { … }
TEST_F(BackgroundApplicationListModelTest, LateExtensionSystemReady) { … }
ExtensionCollection;
namespace {
void AddExtension(extensions::ExtensionService* service,
ExtensionCollection* extensions,
BackgroundApplicationListModel* model,
size_t* expected,
size_t* count) { … }
void RemoveExtension(extensions::ExtensionService* service,
ExtensionCollection* extensions,
BackgroundApplicationListModel* model,
size_t* expected,
size_t* count) { … }
void TogglePermission(extensions::ExtensionService* service,
ExtensionCollection* extensions,
BackgroundApplicationListModel* model,
size_t* expected,
size_t* count) { … }
}
TEST_F(BackgroundApplicationListModelTest, RandomTest) { … }