Support runtime renderer selection in CFDETextOutLargeBitmapTest. Determine expected test results at runtime instead of compile time based on whether the renderer is AGG or Skia. Bug: pdfium:1878 Change-Id: I5e6ed8ed80a3441db343a716f69ce2f1fd2847b9 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/96871 Reviewed-by: Nigi <nigi@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/xfa/fde/cfde_textout_unittest.cpp b/xfa/fde/cfde_textout_unittest.cpp index b83cbfd..cd9bf50 100644 --- a/xfa/fde/cfde_textout_unittest.cpp +++ b/xfa/fde/cfde_textout_unittest.cpp
@@ -117,12 +117,9 @@ } const char* GetLargeTextBlobChecksum() { -#if defined(_SKIA_SUPPORT_) - static const char kExpectedChecksum[] = "6181929583fd7651169306852397806f"; -#else - static const char kExpectedChecksum[] = "268b71a8660b51e31c6bf30fc7ff1e08"; -#endif - return kExpectedChecksum; + if (CFX_DefaultRenderDevice::SkiaIsDefaultRenderer()) + return "6181929583fd7651169306852397806f"; + return "268b71a8660b51e31c6bf30fc7ff1e08"; } };