#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{ … };
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 = …;
}
TEST(PrintBackendServiceManagerTest,
IsIdleTimeoutUpdateNeededForRegisteredClient) { … }
TEST(PrintBackendServiceManagerTest,
IsIdleTimeoutUpdateNeededForUnregisteredClient) { … }
}