chromium/components/segmentation_platform/embedder/default_model/device_switcher_result_dispatcher_unittest.cc

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

#include "components/segmentation_platform/embedder/default_model/device_switcher_result_dispatcher.h"

#include <memory>
#include <string_view>

#include "base/run_loop.h"
#include "base/test/gmock_callback_support.h"
#include "base/test/gmock_move_support.h"
#include "base/test/task_environment.h"
#include "components/prefs/testing_pref_service.h"
#include "components/segmentation_platform/embedder/default_model/device_switcher_model.h"
#include "components/segmentation_platform/public/result.h"
#include "components/segmentation_platform/public/testing/mock_segmentation_platform_service.h"
#include "components/sync/protocol/sync_enums.pb.h"
#include "components/sync_device_info/device_info.h"
#include "components/sync_device_info/device_info_util.h"
#include "components/sync_device_info/fake_device_info_tracker.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace segmentation_platform {

namespace {

RunOnceCallback;
DeviceInfo;
_;
NiceMock;
OsType;
DeviceCountByOsTypeMap;
FakeDeviceInfoTracker;
DeviceType;
DeviceCountByOsTypeMap;

const sync_pb::SyncEnums_DeviceType kLocalDeviceType =;
const DeviceInfo::OsType kLocalDeviceOS =;
const DeviceInfo::FormFactor kLocalDeviceFormFactor =;

std::unique_ptr<DeviceInfo> CreateDeviceInfo(
    const std::string& guid,
    DeviceType device_type,
    OsType os_type,
    base::Time last_updated = base::Time::Now()) {}

class MockFieldTrialRegister : public FieldTrialRegister {};
}  // namespace

class DeviceSwitcherResultDispatcherTest : public testing::Test {};

TEST_F(DeviceSwitcherResultDispatcherTest, SegmentationFailed) {}

TEST_F(DeviceSwitcherResultDispatcherTest, TestWaitForClassificationResult) {}

TEST_F(DeviceSwitcherResultDispatcherTest, ResultRefreshedOnSyncConsent) {}

TEST_F(DeviceSwitcherResultDispatcherTest, TestGetCachedClassificationResult) {}

TEST_F(DeviceSwitcherResultDispatcherTest,
       TestGetClassificationResultAfterWaiting) {}

TEST_F(DeviceSwitcherResultDispatcherTest,
       TestGetClassificationResultWaitTimeout) {}

}  // namespace segmentation_platform