chromium/chrome/browser/extensions/api/declarative_content/request_content_script_apitest.cc

// Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#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 {

// Manifest permissions injected into |kManifest|:
const char* const kPermissions[] =;

// Script matchers for injected into |kBackgroundScriptSource|:
const char* const kScriptMatchers[] =;

enum PermissionOrMatcherType {};

// JSON/JS sources:
const char kManifest[] =;
const char kBackgroundScriptSource[] =;
const char kContentScriptSource[] =;

// Messages from scripts:
const char kInjectionSetup[] =;
const char kInjectionSucceeded[] =;

// Runs all pending tasks in the renderer associated with |web_contents|.
// Returns true on success.
bool RunAllPendingInRenderer(content::WebContents* web_contents) {}

}  // namespace

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) {}


// Try different permutations of "match all", "match particular domain (that is
// visited by test)", and "match nonsense domain (not visited by test)" for
// both manifest permissions and injection matcher conditions.
// http://crbug.com/421118
IN_PROC_BROWSER_TEST_F(RequestContentScriptAPITest,
                       DISABLED_PermissionMatcherAgreementInjection) {}

}  // namespace extensions