chromium/content/public/test/find_test_utils.cc

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

#include "content/public/test/find_test_utils.h"
#include "base/memory/raw_ptr.h"

#include "build/build_config.h"
#include "content/browser/find_request_manager.h"
#include "content/browser/web_contents/web_contents_impl.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace content {

namespace {

const int kInvalidId =;

}  // namespace

FindResults::FindResults(int request_id,
                         int number_of_matches,
                         int active_match_ordinal)
    :{}

FindResults::FindResults() :{}

FindTestWebContentsDelegate::FindTestWebContentsDelegate()
    :{}

FindTestWebContentsDelegate::~FindTestWebContentsDelegate() {}

const FindResults& FindTestWebContentsDelegate::GetFindResults() const {}

void FindTestWebContentsDelegate::WaitForFinalReply() {}

void FindTestWebContentsDelegate::WaitForNextReply() {}

void FindTestWebContentsDelegate::MarkNextReply() {}

void FindTestWebContentsDelegate::UpdateLastRequest(int request_id) {}

void FindTestWebContentsDelegate::StartReplyRecord() {}

const std::vector<FindResults>& FindTestWebContentsDelegate::GetReplyRecord() {}

#if BUILDFLAG(IS_ANDROID)
void FindTestWebContentsDelegate::WaitForMatchRects() {
  WaitFor(MATCH_RECTS);
}
#endif

void FindTestWebContentsDelegate::FindReply(WebContents* web_contents,
                                            int request_id,
                                            int number_of_matches,
                                            const gfx::Rect& selection_rect,
                                            int active_match_ordinal,
                                            bool final_update) {}

bool FindTestWebContentsDelegate::IsBackForwardCacheSupported(
    WebContents& web_contents) {}

void FindTestWebContentsDelegate::WaitFor(WaitingFor wait_for) {}

void FindTestWebContentsDelegate::StopWaiting() {}

#if BUILDFLAG(IS_ANDROID)
void FindTestWebContentsDelegate::FindMatchRectsReply(
    WebContents* web_contents,
    int version,
    const std::vector<gfx::RectF>& rects,
    const gfx::RectF& active_rect) {
  // Update the current rects.
  find_match_rects_ = rects;
  active_match_rect_ = active_rect;

  // If we are waiting for match rects, stop waiting.
  if (waiting_for_ == MATCH_RECTS)
    StopWaiting();
}
#endif

std::unordered_set<raw_ptr<RenderFrameHost, CtnExperimental>>
GetRenderFrameHostsWithPendingFindResults(WebContents* web_contents) {}

}  // namespace content