| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/gfx/path_win.h" | 5 #include "ui/gfx/path_win.h" |
| 6 | 6 |
| 7 #include <stddef.h> |
| 8 |
| 7 #include <algorithm> | 9 #include <algorithm> |
| 8 #include <vector> | 10 #include <vector> |
| 9 | 11 |
| 12 #include "base/macros.h" |
| 10 #include "base/win/scoped_gdi_object.h" | 13 #include "base/win/scoped_gdi_object.h" |
| 11 #include "skia/ext/skia_utils_win.h" | 14 #include "skia/ext/skia_utils_win.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
| 13 #include "third_party/skia/include/core/SkRRect.h" | 16 #include "third_party/skia/include/core/SkRRect.h" |
| 14 #include "ui/gfx/path.h" | 17 #include "ui/gfx/path.h" |
| 15 | 18 |
| 16 namespace gfx { | 19 namespace gfx { |
| 17 | 20 |
| 18 namespace { | 21 namespace { |
| 19 | 22 |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 // Check that empty region is returned for empty path. | 110 // Check that empty region is returned for empty path. |
| 108 TEST(CreateHRGNFromSkPathTest, EmptyPath) { | 111 TEST(CreateHRGNFromSkPathTest, EmptyPath) { |
| 109 Path path; | 112 Path path; |
| 110 base::win::ScopedRegion empty_region(::CreateRectRgn(0, 0, 0, 0)); | 113 base::win::ScopedRegion empty_region(::CreateRectRgn(0, 0, 0, 0)); |
| 111 base::win::ScopedRegion region(CreateHRGNFromSkPath(path)); | 114 base::win::ScopedRegion region(CreateHRGNFromSkPath(path)); |
| 112 EXPECT_TRUE(::EqualRgn(empty_region.get(), region.get())); | 115 EXPECT_TRUE(::EqualRgn(empty_region.get(), region.get())); |
| 113 } | 116 } |
| 114 | 117 |
| 115 } // namespace gfx | 118 } // namespace gfx |
| 116 | 119 |
| OLD | NEW |