Commit 43c8771f authored by Bruce Dawson's avatar Bruce Dawson Committed by Commit Bot

Adjust PDF expectations for Windows 10 19041

The results of some PDF to EMF tests change slightly when building with
the Windows 10.0.19041.0 SDK. The changes are all in the sixth digit
after the decimal place (all changing a 3 to a 2 oddly) and are
therefore near the limits of float precision and are assumed to not be
important.

This change adds new expected-result files and uses them when building
with the new SDK.

See crrev.com/c/2225224 for the proof-of-concept that this fixes some
of the SDK issues.

Bug: 1089996
Change-Id: Ic35bb6d01138cf96de0639c04627a8a9bc325b01
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2229643Reviewed-by: default avatarLei Zhang <thestig@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#774929}
parent 17e52dcc
......@@ -298,8 +298,13 @@ IN_PROC_BROWSER_TEST_F(PdfToEmfConverterBrowserTest, PostScriptLevel2Basic) {
for (int i = 0; i < kNumberOfPages; ++i) {
ASSERT_TRUE(GetPage(i));
// The output is PS encapsulated in EMF.
#ifdef NTDDI_WIN10_VB // Windows 10.0.19041
ASSERT_TRUE(GetPageExpectedEmfData(
GetFileNameForPageNumber("pdf_converter_basic_ps_new_page_", i)));
#else
ASSERT_TRUE(GetPageExpectedEmfData(
GetFileNameForPageNumber("pdf_converter_basic_ps_page_", i)));
#endif
ComparePageEmfHeader();
ComparePageEmfPayload();
}
......@@ -317,8 +322,13 @@ IN_PROC_BROWSER_TEST_F(PdfToEmfConverterBrowserTest, PostScriptLevel3Basic) {
for (int i = 0; i < kNumberOfPages; ++i) {
ASSERT_TRUE(GetPage(i));
// The output is PS encapsulated in EMF.
#ifdef NTDDI_WIN10_VB // Windows 10.0.19041
ASSERT_TRUE(GetPageExpectedEmfData(
GetFileNameForPageNumber("pdf_converter_basic_ps_new_page_", i)));
#else
ASSERT_TRUE(GetPageExpectedEmfData(
GetFileNameForPageNumber("pdf_converter_basic_ps_page_", i)));
#endif
ComparePageEmfHeader();
ComparePageEmfPayload();
}
......@@ -368,8 +378,13 @@ IN_PROC_BROWSER_TEST_F(PdfToEmfConverterBrowserTest,
kLetter200DpiRect, gfx::Point(0, 0), k200DpiSize,
/*autorotate=*/false, /*use_color=*/true,
PdfRenderSettings::Mode::POSTSCRIPT_LEVEL2);
#ifdef NTDDI_WIN10_VB // Windows 10.0.19041
RunSinglePagePdfToPostScriptConverterTest(pdf_settings, "bug_806746.pdf",
"bug_806746_new.emf");
#else
RunSinglePagePdfToPostScriptConverterTest(pdf_settings, "bug_806746.pdf",
"bug_806746.emf");
#endif
}
IN_PROC_BROWSER_TEST_F(PdfToEmfConverterBrowserTest,
......@@ -378,8 +393,13 @@ IN_PROC_BROWSER_TEST_F(PdfToEmfConverterBrowserTest,
kLetter200DpiRect, gfx::Point(0, 0), k200DpiSize,
/*autorotate=*/false, /*use_color=*/true,
PdfRenderSettings::Mode::POSTSCRIPT_LEVEL3);
#ifdef NTDDI_WIN10_VB // Windows 10.0.19041
RunSinglePagePdfToPostScriptConverterTest(pdf_settings, "bug_806746.pdf",
"bug_806746_new.emf");
#else
RunSinglePagePdfToPostScriptConverterTest(pdf_settings, "bug_806746.pdf",
"bug_806746.emf");
#endif
}
IN_PROC_BROWSER_TEST_F(PdfToEmfConverterBrowserTest,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment