#ifdef UNSAFE_BUFFERS_BUILD
#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) { … }
}
class NodeTraversalTest : public PageTestBase { … };
void NodeTraversalTest::SetupSampleHTML(const char* html) { … }
namespace {
void TestCommonAncestor(Node* expected_result,
const Node& node_a,
const Node& node_b) { … }
}
TEST_F(NodeTraversalTest, NextFunctions) { … }
TEST_F(NodeTraversalTest, LastWithin) { … }
TEST_F(NodeTraversalTest, PreviousFunctions) { … }
TEST_F(NodeTraversalTest, ChildAt) { … }
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) { … }
}
}