Fixes for printing OpenPdfInPreview test expectations
Update expectations for macOS-specific tests for opening a print job as a PDF in the Preview app. No fix is needed for the ContentAnalysisAfterPrintPreviewBrowserTest variant of OpenPdfInPreviewFromPrintPreview, as the prior builds did not have failures. It can just be re-enabled as-is. Fixed: 1500113 Change-Id: I2e5f1c80646ca624b6290f5dcb0c1174d2367acf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5014915 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Alan Screen <awscreen@chromium.org> Cr-Commit-Position: refs/heads/main@{#1221948}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
e2ad703d59
commit
044ce30a26
@@ -2549,9 +2549,7 @@ IN_PROC_BROWSER_TEST_P(SystemAccessProcessServicePrintBrowserTest,
|
|||||||
#endif // BUILDFLAG(ENABLE_BASIC_PRINT_DIALOG)
|
#endif // BUILDFLAG(ENABLE_BASIC_PRINT_DIALOG)
|
||||||
|
|
||||||
#if BUILDFLAG(IS_MAC)
|
#if BUILDFLAG(IS_MAC)
|
||||||
IN_PROC_BROWSER_TEST_P(SystemAccessProcessPrintBrowserTest,
|
IN_PROC_BROWSER_TEST_P(SystemAccessProcessPrintBrowserTest, OpenPdfInPreview) {
|
||||||
// TODO(crbug.com/1500113): Re-enable this test
|
|
||||||
DISABLED_OpenPdfInPreview) {
|
|
||||||
AddPrinter("printer1");
|
AddPrinter("printer1");
|
||||||
SetPrinterNameForSubsequentContexts("printer1");
|
SetPrinterNameForSubsequentContexts("printer1");
|
||||||
|
|
||||||
@@ -2575,9 +2573,10 @@ IN_PROC_BROWSER_TEST_P(SystemAccessProcessPrintBrowserTest,
|
|||||||
SetNumExpectedMessages(/*num=*/5);
|
SetNumExpectedMessages(/*num=*/5);
|
||||||
} else {
|
} else {
|
||||||
// The expected events for this are:
|
// The expected events for this are:
|
||||||
// 1. Wait for the one print job to be destroyed, to ensure printing
|
// 1. Update printer settings.
|
||||||
|
// 2. Wait for the one print job to be destroyed, to ensure printing
|
||||||
// finished cleanly before completing the test.
|
// finished cleanly before completing the test.
|
||||||
SetNumExpectedMessages(/*num=*/1);
|
SetNumExpectedMessages(/*num=*/2);
|
||||||
}
|
}
|
||||||
OpenPdfInPreviewOnceReadyAndLoaded();
|
OpenPdfInPreviewOnceReadyAndLoaded();
|
||||||
|
|
||||||
@@ -3470,8 +3469,7 @@ IN_PROC_BROWSER_TEST_P(ContentAnalysisBeforePrintPreviewBrowserTest,
|
|||||||
|
|
||||||
#if BUILDFLAG(IS_MAC)
|
#if BUILDFLAG(IS_MAC)
|
||||||
IN_PROC_BROWSER_TEST_P(ContentAnalysisBeforePrintPreviewBrowserTest,
|
IN_PROC_BROWSER_TEST_P(ContentAnalysisBeforePrintPreviewBrowserTest,
|
||||||
// TODO(crbug.com/1500113): Re-enable this test
|
OpenPdfInPreviewFromPrintPreview) {
|
||||||
DISABLED_OpenPdfInPreviewFromPrintPreview) {
|
|
||||||
AddPrinter("printer_name");
|
AddPrinter("printer_name");
|
||||||
|
|
||||||
ASSERT_TRUE(embedded_test_server()->Started());
|
ASSERT_TRUE(embedded_test_server()->Started());
|
||||||
@@ -3504,9 +3502,10 @@ IN_PROC_BROWSER_TEST_P(ContentAnalysisBeforePrintPreviewBrowserTest,
|
|||||||
// The expected events for this are:
|
// The expected events for this are:
|
||||||
// 1. The document is composited for content analysis.
|
// 1. The document is composited for content analysis.
|
||||||
// 2. The print job used for scanning is destroyed.
|
// 2. The print job used for scanning is destroyed.
|
||||||
// 3. Wait for the actual printing job to be destroyed, to ensure
|
// 3. Update printer settings.
|
||||||
|
// 4. Wait for the actual printing job to be destroyed, to ensure
|
||||||
// printing finished cleanly before completing the test.
|
// printing finished cleanly before completing the test.
|
||||||
SetNumExpectedMessages(/*num=*/3);
|
SetNumExpectedMessages(/*num=*/4);
|
||||||
}
|
}
|
||||||
OpenPdfInPreviewOnceReadyAndLoaded();
|
OpenPdfInPreviewOnceReadyAndLoaded();
|
||||||
} else {
|
} else {
|
||||||
@@ -3768,8 +3767,7 @@ IN_PROC_BROWSER_TEST_P(ContentAnalysisAfterPrintPreviewBrowserTest,
|
|||||||
|
|
||||||
#if BUILDFLAG(IS_MAC)
|
#if BUILDFLAG(IS_MAC)
|
||||||
IN_PROC_BROWSER_TEST_P(ContentAnalysisAfterPrintPreviewBrowserTest,
|
IN_PROC_BROWSER_TEST_P(ContentAnalysisAfterPrintPreviewBrowserTest,
|
||||||
// TODO(crbug.com/1500113): Re-enable this test
|
OpenPdfInPreviewFromPrintPreview) {
|
||||||
DISABLED_OpenPdfInPreviewFromPrintPreview) {
|
|
||||||
AddPrinter("printer_name");
|
AddPrinter("printer_name");
|
||||||
|
|
||||||
if (UseService() && !PrintAllowedOrNonBlockingPolicy()) {
|
if (UseService() && !PrintAllowedOrNonBlockingPolicy()) {
|
||||||
|
Reference in New Issue
Block a user