| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/wm/core/image_grid.h" | 5 #include "ui/wm/core/image_grid.h" |
| 6 | 6 |
| 7 #include "testing/gtest/include/gtest/gtest.h" | 7 #include "testing/gtest/include/gtest/gtest.h" |
| 8 #include "third_party/skia/include/core/SkBitmap.h" | 8 #include "third_party/skia/include/core/SkBitmap.h" |
| 9 #include "ui/aura/test/aura_test_base.h" | 9 #include "ui/aura/test/aura_test_base.h" |
| 10 #include "ui/gfx/image/image.h" | 10 #include "ui/gfx/image/image.h" |
| 11 #include "ui/gfx/image/image_skia.h" | 11 #include "ui/gfx/image/image_skia.h" |
| 12 | 12 |
| 13 namespace views { | 13 namespace wm { |
| 14 namespace corewm { | |
| 15 | 14 |
| 16 namespace { | 15 namespace { |
| 17 | 16 |
| 18 // Creates a gfx::Image with the requested dimensions. | 17 // Creates a gfx::Image with the requested dimensions. |
| 19 gfx::Image* CreateImage(const gfx::Size& size) { | 18 gfx::Image* CreateImage(const gfx::Size& size) { |
| 20 SkBitmap bitmap; | 19 SkBitmap bitmap; |
| 21 bitmap.setConfig(SkBitmap::kARGB_8888_Config, size.width(), size.height()); | 20 bitmap.setConfig(SkBitmap::kARGB_8888_Config, size.width(), size.height()); |
| 22 return new gfx::Image(gfx::ImageSkia::CreateFrom1xBitmap(bitmap)); | 21 return new gfx::Image(gfx::ImageSkia::CreateFrom1xBitmap(bitmap)); |
| 23 } | 22 } |
| 24 | 23 |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 EXPECT_TRUE(grid.right_layer()->visible()); | 330 EXPECT_TRUE(grid.right_layer()->visible()); |
| 332 EXPECT_TRUE(grid.center_layer()->visible()); | 331 EXPECT_TRUE(grid.center_layer()->visible()); |
| 333 | 332 |
| 334 // We shouldn't be clipping the corner images anymore. | 333 // We shouldn't be clipping the corner images anymore. |
| 335 EXPECT_TRUE(test_api.top_left_clip_rect().IsEmpty()); | 334 EXPECT_TRUE(test_api.top_left_clip_rect().IsEmpty()); |
| 336 EXPECT_TRUE(test_api.top_right_clip_rect().IsEmpty()); | 335 EXPECT_TRUE(test_api.top_right_clip_rect().IsEmpty()); |
| 337 EXPECT_TRUE(test_api.bottom_left_clip_rect().IsEmpty()); | 336 EXPECT_TRUE(test_api.bottom_left_clip_rect().IsEmpty()); |
| 338 EXPECT_TRUE(test_api.bottom_right_clip_rect().IsEmpty()); | 337 EXPECT_TRUE(test_api.bottom_right_clip_rect().IsEmpty()); |
| 339 } | 338 } |
| 340 | 339 |
| 341 } // namespace corewm | 340 } // namespace wm |
| 342 } // namespace views | |
| OLD | NEW |