0

Skip PrintBackendWin tests if print drivers are unavailable

Some bots still might not have the print spooler enabled.  Avoid
causing a test failure for such bots.

Bug: 346870428
Change-Id: Ic5965861c50127b52a331fb5aaf54885ea8b44df
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5631239
Commit-Queue: Alan Screen <awscreen@chromium.org>
Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1315341}
This commit is contained in:
Alan Screen
2024-06-14 18:12:16 +00:00
committed by Chromium LUCI CQ
parent ce5dd8e72b
commit af44cd6041

@ -27,7 +27,9 @@ TEST(PrintBackendWinTest, GetPrintableAreaSamePaper) {
std::string printer_name;
mojom::ResultCode result = backend->GetDefaultPrinterName(printer_name);
ASSERT_EQ(mojom::ResultCode::kSuccess, result);
if (result != mojom::ResultCode::kSuccess || printer_name.empty()) {
GTEST_SKIP() << "Printing with real drivers not available";
}
PrinterSemanticCapsAndDefaults caps;
EXPECT_EQ(mojom::ResultCode::kSuccess,
@ -53,7 +55,9 @@ TEST(PrintBackendWinTest, GetPrintableAreaDifferentPaper) {
std::string printer_name;
mojom::ResultCode result = backend->GetDefaultPrinterName(printer_name);
ASSERT_EQ(mojom::ResultCode::kSuccess, result);
if (result != mojom::ResultCode::kSuccess || printer_name.empty()) {
GTEST_SKIP() << "Printing with real drivers not available";
}
PrinterSemanticCapsAndDefaults caps;
EXPECT_EQ(mojom::ResultCode::kSuccess,