blob: 27330f7ec706bd2e6898f111dd5b3ffda1c7db5c [file]
// Copyright 2026 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef COMPONENTS_OPTIMIZATION_GUIDE_CONTENT_BROWSER_PAGE_CONTENT_TEST_UTILS_H_
#define COMPONENTS_OPTIMIZATION_GUIDE_CONTENT_BROWSER_PAGE_CONTENT_TEST_UTILS_H_
#include "components/optimization_guide/proto/features/common_quality_data.pb.h"
namespace optimization_guide {
// Returns the first node in `root` and its sub-nodes (recursively in pre-order)
// that matches `attribute_type`. Returns nullptr if no match is found.
const proto::ContentNode* FindFirstNodeWithAttributeType(
const proto::ContentNode& root,
proto::ContentAttributeType attribute_type);
} // namespace optimization_guide
#endif // COMPONENTS_OPTIMIZATION_GUIDE_CONTENT_BROWSER_PAGE_CONTENT_TEST_UTILS_H_