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

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

#include "third_party/blink/renderer/core/loader/render_blocking_resource_manager.h"

#include "base/test/scoped_feature_list.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/renderer/core/dom/element.h"
#include "third_party/blink/renderer/core/frame/web_local_frame_impl.h"
#include "third_party/blink/renderer/core/html/html_head_element.h"
#include "third_party/blink/renderer/core/layout/layout_object.h"
#include "third_party/blink/renderer/core/layout/layout_shift_tracker.h"
#include "third_party/blink/renderer/core/style/computed_style.h"
#include "third_party/blink/renderer/core/testing/sim/sim_request.h"
#include "third_party/blink/renderer/core/testing/sim/sim_test.h"
#include "third_party/blink/renderer/platform/testing/unit_test_helpers.h"

namespace blink {

class RenderBlockingResourceManagerTest : public SimTest {};

TEST_F(RenderBlockingResourceManagerTest, FastFontFinishBeforeBody) {}

TEST_F(RenderBlockingResourceManagerTest, FastFontFinishAfterBody) {}

TEST_F(RenderBlockingResourceManagerTest, SlowFontTimeoutBeforeBody) {}

TEST_F(RenderBlockingResourceManagerTest, SlowFontTimeoutAfterBody) {}

// A trivial test case to verify test setup
TEST_F(RenderBlockingResourceManagerTest, RegularWebFont) {}

TEST_F(RenderBlockingResourceManagerTest, OptionalFontWithoutPreloading) {}

TEST_F(RenderBlockingResourceManagerTest, OptionalFontMissingFirstFrame) {}

TEST_F(RenderBlockingResourceManagerTest,
       OptionalFontForcedLayoutNoLayoutShift) {}

TEST_F(RenderBlockingResourceManagerTest, OptionalFontRemoveAndReadd) {}

TEST_F(RenderBlockingResourceManagerTest, OptionalFontSlowPreloading) {}

TEST_F(RenderBlockingResourceManagerTest, OptionalFontFastPreloading) {}

TEST_F(RenderBlockingResourceManagerTest, OptionalFontSlowImperativeLoad) {}

TEST_F(RenderBlockingResourceManagerTest, OptionalFontFastImperativeLoad) {}

TEST_F(RenderBlockingResourceManagerTest, ScriptInsertedBodyUnblocksRendering) {}

// https://crbug.com/1308083
TEST_F(RenderBlockingResourceManagerTest, ParserBlockingScriptBeforeFont) {}

class RenderBlockingFontTest : public RenderBlockingResourceManagerTest {};

TEST_F(RenderBlockingFontTest, FastFontPreloadWithoutOtherBlockingResources) {}

TEST_F(RenderBlockingFontTest, SlowFontPreloadWithoutOtherBlockingResources) {}

TEST_F(RenderBlockingFontTest,
       SlowFontPreloadAndSlowBodyWithoutOtherBlockingResources) {}

TEST_F(RenderBlockingFontTest, FastFontPreloadWithOtherBlockingResources) {}

TEST_F(RenderBlockingFontTest, FontPreloadExceedingMaxBlockingTime) {}

TEST_F(RenderBlockingFontTest, FontPreloadExceedingMaxFCPDelay) {}

TEST_F(RenderBlockingFontTest, FontPreloadExceedingBothLimits) {}

}  // namespace blink