chromium/chrome/browser/printing/print_backend_service_manager_unittest.cc

// Copyright 2022 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/printing/print_backend_service_manager.h"

#include <optional>
#include <string>

#include "base/containers/flat_map.h"
#include "base/containers/flat_set.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace printing {

ClientId;
ClientsSet;
PrintClientsMap;
QueryWithUiClientsMap;
RemoteId;

namespace {

const RemoteId kRemoteIdEmpty{};
const RemoteId kRemoteIdTestPrinter{};

// ClientId values should not repeat for different types.
const ClientId kClientIdQuery1{};
const ClientId kClientIdQuery2{};
const ClientId kClientIdQueryWithUi1{};
#if BUILDFLAG(ENABLE_CONCURRENT_BASIC_PRINT_DIALOGS)
const ClientId kClientIdQueryWithUi2{};
#endif
const ClientId kClientIdPrintDocument1{};
const ClientId kClientIdPrintDocument2{};
const ClientId kClientIdPrintDocument3{};

const ClientsSet kTestQueryNoClients;
const ClientsSet kTestQueryWithOneClient{};
const ClientsSet kTestQueryWithTwoClients{};

const QueryWithUiClientsMap kTestQueryWithUiNoClients;
const QueryWithUiClientsMap kTestQueryWithUiOneClient{};
#if BUILDFLAG(ENABLE_CONCURRENT_BASIC_PRINT_DIALOGS)
const QueryWithUiClientsMap kTestQueryWithUiTwoClients{};
#endif

const PrintClientsMap kTestPrintDocumentNoClients;
const PrintClientsMap kTestPrintDocumentOnePrinterWithOneClient{};
const PrintClientsMap kTestPrintDocumentOnePrinterWithTwoClients{};
const PrintClientsMap kTestPrintDocumentTwoPrintersWithOneClientEach{};

constexpr std::optional<base::TimeDelta> kNoNewTimeoutNeeded;
constexpr std::optional<base::TimeDelta> kMaxTimeout =;

}  // namespace

TEST(PrintBackendServiceManagerTest,
     IsIdleTimeoutUpdateNeededForRegisteredClient) {}

TEST(PrintBackendServiceManagerTest,
     IsIdleTimeoutUpdateNeededForUnregisteredClient) {}

}  // namespace printing