#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "base/files/file_path.h"
#include "base/memory/raw_ptr.h"
#include "base/strings/stringprintf.h"
#include "chrome/browser/extensions/extension_browsertest.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/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "extensions/test/extension_test_message_listener.h"
#include "extensions/test/test_extension_dir.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace extensions {
namespace {
const char* const kPermissions[] = …;
const char* const kScriptMatchers[] = …;
enum PermissionOrMatcherType { … };
const char kManifest[] = …;
const char kBackgroundScriptSource[] = …;
const char kContentScriptSource[] = …;
const char kInjectionSetup[] = …;
const char kInjectionSucceeded[] = …;
bool RunAllPendingInRenderer(content::WebContents* web_contents) { … }
}
class RequestContentScriptAPITest : public ExtensionBrowserTest { … };
RequestContentScriptAPITest::RequestContentScriptAPITest()
: … { … }
testing::AssertionResult RequestContentScriptAPITest::RunTest(
PermissionOrMatcherType manifest_permission,
PermissionOrMatcherType script_matcher,
bool should_inject) { … }
testing::AssertionResult RequestContentScriptAPITest::CreateAndLoadExtension(
PermissionOrMatcherType manifest_permission,
PermissionOrMatcherType script_matcher) { … }
IN_PROC_BROWSER_TEST_F(RequestContentScriptAPITest,
DISABLED_PermissionMatcherAgreementInjection) { … }
}