| 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 "cc/layers/painted_scrollbar_layer_impl.h" | 5 #include "cc/layers/painted_scrollbar_layer_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "cc/quads/draw_quad.h" | 9 #include "cc/quads/draw_quad.h" |
| 10 #include "cc/quads/texture_draw_quad.h" | 10 #include "cc/quads/texture_draw_quad.h" |
| 11 #include "cc/resources/ui_resource_bitmap.h" |
| 11 #include "cc/test/layer_test_common.h" | 12 #include "cc/test/layer_test_common.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 13 | 14 |
| 14 namespace cc { | 15 namespace cc { |
| 15 namespace { | 16 namespace { |
| 16 | 17 |
| 17 TEST(PaintedScrollbarLayerImplTest, Occlusion) { | 18 TEST(PaintedScrollbarLayerImplTest, Occlusion) { |
| 18 gfx::Size layer_size(10, 1000); | 19 gfx::Size layer_size(10, 1000); |
| 19 float scale = 2.f; | 20 float scale = 2.f; |
| 20 gfx::Size scaled_layer_size(20, 2000); | 21 gfx::Size scaled_layer_size(20, 2000); |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 LayerTestCommon::VerifyQuadsAreOccluded( | 124 LayerTestCommon::VerifyQuadsAreOccluded( |
| 124 impl.quad_list(), occluded, &partially_occluded_count); | 125 impl.quad_list(), occluded, &partially_occluded_count); |
| 125 // The layer outputs two quads, which is partially occluded. | 126 // The layer outputs two quads, which is partially occluded. |
| 126 EXPECT_EQ(2u, impl.quad_list().size()); | 127 EXPECT_EQ(2u, impl.quad_list().size()); |
| 127 EXPECT_EQ(2u, partially_occluded_count); | 128 EXPECT_EQ(2u, partially_occluded_count); |
| 128 } | 129 } |
| 129 } | 130 } |
| 130 | 131 |
| 131 } // namespace | 132 } // namespace |
| 132 } // namespace cc | 133 } // namespace cc |
| OLD | NEW |