chromium/third_party/blink/renderer/core/dom/node_traversal_test.cc

// Copyright 2021 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/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "third_party/blink/renderer/core/dom/node_traversal.h"

#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/dom/element.h"
#include "third_party/blink/renderer/core/dom/text.h"
#include "third_party/blink/renderer/core/html/html_element.h"
#include "third_party/blink/renderer/core/html/html_head_element.h"
#include "third_party/blink/renderer/core/testing/page_test_base.h"

namespace blink {
namespace node_traversal_test {

namespace {

template <class T>
HeapVector<Member<Node>> CollectFromIterable(T iterable) {}

void RemoveWhiteSpaceOnlyTextNodes(ContainerNode& container) {}

}  // namespace

class NodeTraversalTest : public PageTestBase {};

void NodeTraversalTest::SetupSampleHTML(const char* html) {}

namespace {

void TestCommonAncestor(Node* expected_result,
                        const Node& node_a,
                        const Node& node_b) {}

}  // namespace

// Test case for
//  - Next
//  - NextSkippingChildren
//  - NextPostOrder
TEST_F(NodeTraversalTest, NextFunctions) {}

// Test case for
//  - LastWithin
//  - LastWithinOrSelf
TEST_F(NodeTraversalTest, LastWithin) {}

// Test case for
//  - Previous
//  - PreviousAbsoluteSibling
//  - PreviousPostOrder
TEST_F(NodeTraversalTest, PreviousFunctions) {}

// Test case for
//  - ChildAt
//  - CountChildren
//  - HasChildren
//  - Index
//  - IsDescendantOf
TEST_F(NodeTraversalTest, ChildAt) {}

// Test case for
//  - FirstChild
//  - LastChild
//  - NextSibling
//  - PreviousSibling
//  - Parent
TEST_F(NodeTraversalTest, Siblings) {}

TEST_F(NodeTraversalTest, commonAncestor) {}

TEST_F(NodeTraversalTest, AncestorsOf) {}

TEST_F(NodeTraversalTest, InclusiveAncestorsOf) {}

TEST_F(NodeTraversalTest, ChildrenOf) {}

TEST_F(NodeTraversalTest, DescendantsOf) {}

TEST_F(NodeTraversalTest, InclusiveDescendantsOf) {}

}  // namespace node_traversal_test
}  // namespace blink