#include "third_party/blink/renderer/core/dom/shadow_including_tree_order_traversal.h"
#include "testing/gmock/include/gmock/gmock-matchers.h"
#include "third_party/blink/renderer/core/dom/node_traversal.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/testing/page_test_base.h"
namespace blink {
namespace {
ShadowIncludingTreeOrderTraversalTest;
ElementsAre;
Vector<String> GatherElementIdsFromTraversalRange(auto traversal_range) {
Vector<String> ids;
for (Node& node : traversal_range) {
if (auto* el = DynamicTo<Element>(node)) {
ids.push_back(el->GetIdAttribute());
} else if (node.IsShadowRoot()) {
ids.push_back("shadow");
}
}
return ids;
}
void RemoveWhiteSpaceOnlyTextNodes(ContainerNode& container) { … }
TEST_F(ShadowIncludingTreeOrderTraversalTest, Next) { … }
TEST_F(ShadowIncludingTreeOrderTraversalTest, DescendantsOf) { … }
TEST_F(ShadowIncludingTreeOrderTraversalTest, ChildrenOf) { … }
}
}