#include "components/segmentation_platform/embedder/input_delegate/tab_rank_dispatcher.h"
#include <memory>
#include "base/functional/bind.h"
#include "base/memory/raw_ptr.h"
#include "base/strings/string_util.h"
#include "base/test/gmock_callback_support.h"
#include "base/time/time.h"
#include "components/segmentation_platform/embedder/tab_fetcher.h"
#include "components/segmentation_platform/public/constants.h"
#include "components/segmentation_platform/public/result.h"
#include "components/segmentation_platform/public/testing/mock_segmentation_platform_service.h"
#include "components/segmentation_platform/public/trigger.h"
#include "components/sessions/core/session_id.h"
#include "components/sessions/core/session_types.h"
#include "components/sync_sessions/synced_session.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace segmentation_platform {
namespace {
_;
Return;
constexpr char kLocalTabName[] = …;
constexpr char kRemoteTabName1[] = …;
constexpr char kRemoteTabName2[] = …;
const base::TimeDelta kTime1 = …;
const base::TimeDelta kTime2 = …;
const base::TimeDelta kTime3 = …;
const TrainingRequestId kTestRequestId = …;
std::unique_ptr<sync_sessions::SyncedSession> CreateNewSession(
const std::string& tab_guid,
const base::Time& session_time) { … }
const sessions::SessionTab* GetTab(
const sync_sessions::SyncedSession* session) { … }
class MockSessionSyncService : public sync_sessions::SessionSyncService { … };
class MockOpenTabsUIDelegate : public sync_sessions::OpenTabsUIDelegate { … };
AnnotatedNumericResult CreateResult(float val) { … }
}
class TabRankDispatcherTest : public testing::Test { … };
TEST_F(TabRankDispatcherTest, RankTabs) { … }
TEST_F(TabRankDispatcherTest, FilterTabs) { … }
TEST_F(TabRankDispatcherTest, TabsWithSameScore) { … }
}