chromium/third_party/blink/renderer/core/html/parser/html_preload_scanner_document_test.cc

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

#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/platform/web_prescient_networking.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/loader/no_state_prefetch_client.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/testing_platform_support.h"

namespace blink {

class MockNoStatePrefetchClient : public NoStatePrefetchClient {};

class MockPrescientNetworking : public WebPrescientNetworking {};

// HTMLPreloadScannerDocumentTest tests if network hints are
// properly committed/suppressed on various HTMLDocumentParser uses.
//
// HTMLPreloadScannerDocumentTest uses SimTest so we have a valid
// ResourceFetcher. SimTest disables asynchronous parsing mode, so we rely on
// web_tests for asynchronous parsing testing cases.
//
// See also: web_tests/http/tests/preload and web_tests/fast/preloader.
class HTMLPreloadScannerDocumentTest : public SimTest {};

#if BUILDFLAG(IS_IOS)
// TODO(crbug.com/1141478)
#define MAYBE_DOMParser
#else
#define MAYBE_DOMParser
#endif  // BUILDFLAG(IS_IOS)
TEST_F(HTMLPreloadScannerDocumentTest, MAYBE_DOMParser) {}

TEST_F(HTMLPreloadScannerDocumentTest, DetachedDocumentInnerHTML) {}

TEST_F(HTMLPreloadScannerDocumentTest, XHRResponseDocument) {}

TEST_F(HTMLPreloadScannerDocumentTest,
       SetsClientHintsPreferencesOnFrameDelegateCH) {}

TEST_F(HTMLPreloadScannerDocumentTest,
       SetsClientHintsPreferencesOnFrameAcceptCH) {}

}  // namespace blink