chromium/chrome/browser/extensions/extension_user_script_loader_unittest.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.

#include "extensions/browser/extension_user_script_loader.h"

#include <stddef.h>

#include <memory>
#include <optional>
#include <set>
#include <string>

#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/location.h"
#include "base/path_service.h"
#include "base/run_loop.h"
#include "base/strings/string_util.h"
#include "base/test/bind.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/values_test_util.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/test/base/testing_profile.h"
#include "content/public/test/browser_task_environment.h"
#include "content/public/test/test_utils.h"
#include "extensions/browser/content_verifier/content_verifier.h"
#include "extensions/common/extension_builder.h"
#include "testing/gtest/include/gtest/gtest.h"

URLPatternSet;

namespace {

static void AddPattern(URLPatternSet* extent, const std::string& pattern) {}
}  // namespace

namespace extensions {

// Test bringing up a script loader on a specific directory, putting a script
// in there, etc.
class ExtensionUserScriptLoaderTest : public testing::Test {};

// Test that a callback passed in will get called once scripts are loaded.
TEST_F(ExtensionUserScriptLoaderTest, NoScriptsWithCallbackAfterLoad) {}

// Verifies that adding an empty set of scripts will trigger a callback
// immediately but will not trigger a load.
TEST_F(ExtensionUserScriptLoaderTest, NoScriptsAddedWithCallback) {}

// Test that all callbacks will be called when a load completes and no other
// load is queued.
TEST_F(ExtensionUserScriptLoaderTest, QueuedLoadWithCallback) {}

TEST_F(ExtensionUserScriptLoaderTest, Parse1) {}

TEST_F(ExtensionUserScriptLoaderTest, Parse2) {}

TEST_F(ExtensionUserScriptLoaderTest, Parse3) {}

TEST_F(ExtensionUserScriptLoaderTest, Parse4) {}

TEST_F(ExtensionUserScriptLoaderTest, Parse5) {}

TEST_F(ExtensionUserScriptLoaderTest, Parse6) {}

TEST_F(ExtensionUserScriptLoaderTest, Parse7) {}

TEST_F(ExtensionUserScriptLoaderTest, Parse8) {}

TEST_F(ExtensionUserScriptLoaderTest, SkipBOMAtTheBeginning) {}

TEST_F(ExtensionUserScriptLoaderTest, LeaveBOMNotAtTheBeginning) {}

TEST_F(ExtensionUserScriptLoaderTest, ComponentExtensionContentScriptIsLoaded) {}

TEST_F(ExtensionUserScriptLoaderTest, RecordScriptLengthUmas) {}

}  // namespace extensions