diff --git a/src/renderer/win32/BUILD.bazel b/src/renderer/win32/BUILD.bazel index 90ed9ace7..e1b64fae0 100644 --- a/src/renderer/win32/BUILD.bazel +++ b/src/renderer/win32/BUILD.bazel @@ -301,7 +301,6 @@ mozc_cc_test( mozc_cc_test( name = "win32_image_util_test", srcs = ["win32_image_util_test.cc"], - copts = copts_wtl(), data = [ "//data/test/renderer/win32", ], @@ -319,7 +318,7 @@ mozc_cc_test( "//data/test/renderer/win32:test_spec_cc_proto", "//testing:gunit_main", "//testing:mozctest", - "//third_party/wtl", "@com_google_absl//absl/strings", + "@com_microsoft_wil//:wil", ], ) diff --git a/src/renderer/win32/win32_image_util_test.cc b/src/renderer/win32/win32_image_util_test.cc index 2c552308d..c98d84a97 100644 --- a/src/renderer/win32/win32_image_util_test.cc +++ b/src/renderer/win32/win32_image_util_test.cc @@ -29,13 +29,9 @@ #include "renderer/win32/win32_image_util.h" -// clang-format off #include #include -#include -#include -#include -// clang-format on +#include #undef StrCat @@ -77,8 +73,6 @@ using ::mozc::renderer::win32::internal::TextLabel; using ::mozc::win32::Utf8ToWide; using ::mozc::win32::WideToUtf8; -using ::WTL::CBitmap; - using BalloonImageInfo = BalloonImage::BalloonImageInfo; using SubdivisionalPixelIterator = SubdivisionalPixel::SubdivisionalPixelIterator; @@ -115,8 +109,8 @@ class BalloonImageTest : public ::testing::Test, CPoint tail_offset; CSize size; std::vector buffer; - CBitmap dib = TestableBalloonImage::CreateInternal(info, &tail_offset, - &size, &buffer); + wil::unique_hbitmap dib(TestableBalloonImage::CreateInternal( + info, &tail_offset, &size, &buffer)); TestSpec spec = TestSpec(); BalloonInfoToTextProto(info, &spec); @@ -335,8 +329,8 @@ TEST_P(BalloonImageTest, TestImpl) { CPoint actual_tail_offset; CSize actual_size; std::vector actual_buffer; - CBitmap dib = TestableBalloonImage::CreateInternal( - info, &actual_tail_offset, &actual_size, &actual_buffer); + wil::unique_hbitmap dib(TestableBalloonImage::CreateInternal( + info, &actual_tail_offset, &actual_size, &actual_buffer)); EXPECT_EQ(actual_tail_offset.x, spec.output().tail_offset_x()); EXPECT_EQ(actual_tail_offset.y, spec.output().tail_offset_y());