Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(563)

Unified Diff: ui/gfx/path_win_unittest.cc

Issue 1406403007: Eliminate HICON leaks caused by creating icons from bitmap image. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use ScopedHICON instead of HICON. Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/gfx/path_win_unittest.cc
diff --git a/ui/gfx/path_win_unittest.cc b/ui/gfx/path_win_unittest.cc
index 1c211d7dacebe51859fe0e265c7f98a92e6aece1..1e3395cd910aac6d2fb87e93481502ceb30d60fc 100644
--- a/ui/gfx/path_win_unittest.cc
+++ b/ui/gfx/path_win_unittest.cc
@@ -79,7 +79,7 @@ TEST(CreateHRGNFromSkPathTest, RoundCornerTest) {
rrect.setRectXY(SkRect::MakeWH(50, 50), 20, 20);
path.addRRect(rrect);
base::win::ScopedRegion region(CreateHRGNFromSkPath(path));
- const std::vector<SkIRect>& region_rects = GetRectsFromHRGN(region);
+ const std::vector<SkIRect>& region_rects = GetRectsFromHRGN(region.get());
EXPECT_EQ(arraysize(rects), region_rects.size());
for (size_t i = 0; i < arraysize(rects) && i < region_rects.size(); ++i)
EXPECT_EQ(rects[i], region_rects[i]);
@@ -98,7 +98,7 @@ TEST(CreateHRGNFromSkPathTest, NonContiguousPath) {
path.addRect(SkRect::Make(rect));
}
base::win::ScopedRegion region(CreateHRGNFromSkPath(path));
- const std::vector<SkIRect>& region_rects = GetRectsFromHRGN(region);
+ const std::vector<SkIRect>& region_rects = GetRectsFromHRGN(region.get());
ASSERT_EQ(arraysize(rects), region_rects.size());
for (size_t i = 0; i < arraysize(rects); ++i)
EXPECT_EQ(rects[i], region_rects[i]);
@@ -109,7 +109,7 @@ TEST(CreateHRGNFromSkPathTest, EmptyPath) {
Path path;
base::win::ScopedRegion empty_region(::CreateRectRgn(0, 0, 0, 0));
base::win::ScopedRegion region(CreateHRGNFromSkPath(path));
- EXPECT_TRUE(::EqualRgn(empty_region, region));
+ EXPECT_TRUE(::EqualRgn(empty_region.get(), region.get()));
}
} // namespace gfx

Powered by Google App Engine
This is Rietveld 408576698