
Introduce a test which changes the paper size after the initial preview has been prepared. Changing the paper size initiates a rerender for the new page, and causes another call to PrintViewManagerBase::UpdatePrintSettings(). This provides a test to cover the Windows behavior for calling UpdatePrintableArea(). Update TestPrintBackend::GetPrinterSemanticCapsAndDefaults() so that it sets the printable area the same way as PrintBackendWin, where any paper size other than the default paper has a printable area that matches the physical size. To make the test meaningful, modify the test papers by PrintBrowserTest::AddPrinter() so that they have a printable area which is different than the physical size. Include matching changes to the paper sizes used in system_access_process_print_browsertest.cc for checking the resultant sizes in device units. Bug: 1424368, 1432720 Change-Id: Id4ff3bc81100b6292c9dd09b5afc62badfccb479 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4429242 Reviewed-by: Andy Phan <andyphan@chromium.org> Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com> Commit-Queue: Alan Screen <awscreen@chromium.org> Cr-Commit-Position: refs/heads/main@{#1131549}
//printing
contains foundational code that is used for printing. It can depend
on other low-level directories like //cc/paint
and //ui
, but not higher
level code like //components
or //content
. Higher level printing code should
live in //components/printing
or the embedder.