#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/threading/thread_restrictions.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "extensions/common/constants.h"
#include "extensions/common/file_util.h"
#include "extensions/test/result_catcher.h"
#include "extensions/test/test_extension_dir.h"
#include "net/dns/mock_host_resolver.h"
#include "third_party/blink/public/common/features.h"
namespace extensions {
enum class ManifestVersion { … };
class SandboxedPagesTest
: public ExtensionApiTest,
public ::testing::WithParamInterface<ManifestVersion> { … };
class SandboxAPIMetricsTest : public ExtensionApiTest,
public ::testing::WithParamInterface<bool> { … };
INSTANTIATE_TEST_SUITE_P(…);
IN_PROC_BROWSER_TEST_P(SandboxedPagesTest, SandboxedPages) { … }
IN_PROC_BROWSER_TEST_F(SandboxedPagesTest, ManifestV2DisallowsWebContent) { … }
IN_PROC_BROWSER_TEST_F(SandboxedPagesTest, ManifestV3AllowsWebContent) { … }
IN_PROC_BROWSER_TEST_P(SandboxAPIMetricsTest,
SandboxedApiAccessTriggersHistogramCounts) { … }
IN_PROC_BROWSER_TEST_P(SandboxAPIMetricsTest,
NonSandboxedApiAccessDoesntTriggerHistogramCounts) { … }
INSTANTIATE_TEST_SUITE_P(…);
IN_PROC_BROWSER_TEST_P(SandboxedPagesTest, WebAccessibleResourcesTest) { … }
}