chromium/chrome/browser/ui/webui/top_chrome/profile_preload_candidate_selector_unittest.cc

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

#include "chrome/browser/ui/webui/top_chrome/profile_preload_candidate_selector.h"

#include <memory>
#include <string>
#include <vector>

#include "base/containers/contains.h"
#include "base/run_loop.h"
#include "base/test/bind.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/webui/top_chrome/per_profile_webui_tracker.h"
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "components/site_engagement/content/site_engagement_score.h"
#include "components/site_engagement/content/site_engagement_service.h"
#include "content/public/browser/web_contents.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "url/gurl.h"

SiteEngagementScore;
SiteEngagementService;
_;
Return;

namespace {

// The mock webui tracker simulates the presence state of WebUIs under
// a profile.
class MockPerProfileWebUITracker : public PerProfileWebUITracker {};

}  // namespace

namespace webui {

class ProfilePreloadCandidateSelectorTest
    : public ChromeRenderViewHostTestHarness {};

// Tests that the candidate selector does not select WebUIs that are present.
TEST_F(ProfilePreloadCandidateSelectorTest, IgnorePresentWebUI) {}

// Tests that the candidate selector does not select WebUIs with low
// engagement level.
TEST_F(ProfilePreloadCandidateSelectorTest, IgnoreLowEngagementWebUIs) {}

// Tests that the candidate selector selects the WebUI with the highest
// engagement score.
TEST_F(ProfilePreloadCandidateSelectorTest, PreferHighEngagementWebUI) {}

}  // namespace webui