Do not build googletest/googlemock when building pdfium_test. By breaking the dependency from test_support to googletest/googlemock. Change-Id: Icfe675c4ba2977c53834a73cac48901a6cd0636e Reviewed-on: https://pdfium-review.googlesource.com/c/49993 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/testing/BUILD.gn b/testing/BUILD.gn index a0531de..1f31d74 100644 --- a/testing/BUILD.gn +++ b/testing/BUILD.gn
@@ -34,8 +34,6 @@ "../:pdfium", "../core/fdrm", "image_diff", - "//testing/gmock", - "//testing/gtest", ] configs += [ "../:pdfium_core_config" ] visibility = [ "../*" ]
diff --git a/testing/utils/bitmap_saver.cpp b/testing/utils/bitmap_saver.cpp index 38f2cf2..af13efc 100644 --- a/testing/utils/bitmap_saver.cpp +++ b/testing/utils/bitmap_saver.cpp
@@ -7,8 +7,8 @@ #include <fstream> #include <vector> -#include "testing/gtest/include/gtest/gtest.h" #include "testing/image_diff/image_diff_png.h" +#include "third_party/base/logging.h" // static void BitmapSaver::WriteBitmapToPng(FPDF_BITMAP bitmap, @@ -30,14 +30,14 @@ &png_encoding); } - ASSERT_TRUE(encoded); - ASSERT_LT(filename.size(), 256u); + DCHECK(encoded); + DCHECK(filename.size() < 256u); std::ofstream png_file; png_file.open(filename, std::ios_base::out | std::ios_base::binary); png_file.write(reinterpret_cast<char*>(&png_encoding.front()), png_encoding.size()); - ASSERT_TRUE(png_file.good()); + DCHECK(png_file.good()); png_file.close(); }