chromium/third_party/blink/renderer/core/loader/document_loader_auto_speculation_rules_test.cc

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

#include "base/test/metrics/histogram_tester.h"
#include "base/test/scoped_feature_list.h"
#include "base/types/cxx23_to_underlying.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/common/loader/javascript_framework_detection.h"
#include "third_party/blink/public/mojom/loader/javascript_framework_detection.mojom-shared.h"
#include "third_party/blink/renderer/core/frame/frame_test_helpers.h"
#include "third_party/blink/renderer/core/loader/document_loader.h"
#include "third_party/blink/renderer/core/speculation_rules/auto_speculation_rules_test_helper.h"
#include "third_party/blink/renderer/core/speculation_rules/document_speculation_rules.h"
#include "third_party/blink/renderer/core/speculation_rules/speculation_rules_metrics.h"
#include "third_party/blink/renderer/platform/testing/task_environment.h"
#include "third_party/blink/renderer/platform/testing/unit_test_helpers.h"
#include "third_party/blink/renderer/platform/testing/url_test_helpers.h"

namespace blink {
namespace {

class DocumentLoaderAutoSpeculationRulesTest : public ::testing::Test {};

enum class OptOutRuleSetType {};
class DocumentLoaderAutoSpeculationRulesOptOutTest
    : public DocumentLoaderAutoSpeculationRulesTest,
      public testing::WithParamInterface<OptOutRuleSetType> {};

TEST_F(DocumentLoaderAutoSpeculationRulesTest, InvalidJSON) {}

TEST_F(DocumentLoaderAutoSpeculationRulesTest, ValidFrameworkRules) {}

TEST_F(DocumentLoaderAutoSpeculationRulesTest, MultipleFrameworkRules) {}

TEST_F(DocumentLoaderAutoSpeculationRulesTest, ValidUrlMatchPatternRules) {}

TEST_P(DocumentLoaderAutoSpeculationRulesOptOutTest, ExistingRuleSetOptsOut) {}

TEST_P(DocumentLoaderAutoSpeculationRulesOptOutTest,
       ExistingRuleSetOptOutIgnored) {}

TEST_P(DocumentLoaderAutoSpeculationRulesOptOutTest, AddedLaterRuleSetOptsOut) {}

TEST_P(DocumentLoaderAutoSpeculationRulesOptOutTest,
       AddedLaterRuleSetOptOutIgnored) {}

INSTANTIATE_TEST_SUITE_P();

}  // namespace
}  // namespace blink