OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "cc/scrollbar_layer.h" | 5 #include "cc/scrollbar_layer.h" |
6 | 6 |
7 #include "cc/scrollbar_animation_controller.h" | 7 #include "cc/scrollbar_animation_controller.h" |
8 #include "cc/scrollbar_layer_impl.h" | 8 #include "cc/scrollbar_layer_impl.h" |
9 #include "cc/single_thread_proxy.h" | 9 #include "cc/single_thread_proxy.h" |
10 #include "cc/test/fake_impl_proxy.h" | 10 #include "cc/test/fake_impl_proxy.h" |
11 #include "cc/test/fake_layer_tree_host_impl.h" | 11 #include "cc/test/fake_layer_tree_host_impl.h" |
12 #include "cc/test/fake_scrollbar_theme_painter.h" | 12 #include "cc/test/fake_scrollbar_theme_painter.h" |
13 #include "cc/test/fake_web_graphics_context_3d.h" | |
14 #include "cc/test/fake_web_scrollbar.h" | 13 #include "cc/test/fake_web_scrollbar.h" |
15 #include "cc/test/fake_web_scrollbar_theme_geometry.h" | 14 #include "cc/test/fake_web_scrollbar_theme_geometry.h" |
16 #include "cc/test/layer_tree_test_common.h" | 15 #include "cc/test/layer_tree_test_common.h" |
| 16 #include "cc/test/test_web_graphics_context_3d.h" |
17 #include "cc/tree_synchronizer.h" | 17 #include "cc/tree_synchronizer.h" |
18 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
19 #include "third_party/WebKit/Source/Platform/chromium/public/WebScrollbar.h" | 19 #include "third_party/WebKit/Source/Platform/chromium/public/WebScrollbar.h" |
20 #include "third_party/WebKit/Source/Platform/chromium/public/WebScrollbarThemeGe
ometry.h" | 20 #include "third_party/WebKit/Source/Platform/chromium/public/WebScrollbarThemeGe
ometry.h" |
21 | 21 |
22 namespace cc { | 22 namespace cc { |
23 namespace { | 23 namespace { |
24 | 24 |
25 scoped_ptr<LayerImpl> layerImplForScrollAreaAndScrollbar( | 25 scoped_ptr<LayerImpl> layerImplForScrollAreaAndScrollbar( |
26 FakeLayerTreeHostImpl* host_impl, | 26 FakeLayerTreeHostImpl* host_impl, |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 { | 180 { |
181 } | 181 } |
182 | 182 |
183 private: | 183 private: |
184 scoped_refptr<ScrollbarLayer> m_scrollbarLayer; | 184 scoped_refptr<ScrollbarLayer> m_scrollbarLayer; |
185 scoped_refptr<Layer> m_scrollLayer; | 185 scoped_refptr<Layer> m_scrollLayer; |
186 gfx::Size m_bounds; | 186 gfx::Size m_bounds; |
187 }; | 187 }; |
188 | 188 |
189 TEST_F(ScrollbarLayerTestMaxTextureSize, runTest) { | 189 TEST_F(ScrollbarLayerTestMaxTextureSize, runTest) { |
190 scoped_ptr<FakeWebGraphicsContext3D> context = FakeWebGraphicsContext3D::Cre
ate(); | 190 scoped_ptr<TestWebGraphicsContext3D> context = TestWebGraphicsContext3D::Cre
ate(); |
191 int max_size = 0; | 191 int max_size = 0; |
192 context->getIntegerv(GL_MAX_TEXTURE_SIZE, &max_size); | 192 context->getIntegerv(GL_MAX_TEXTURE_SIZE, &max_size); |
193 setScrollbarBounds(gfx::Size(max_size + 100, max_size + 100)); | 193 setScrollbarBounds(gfx::Size(max_size + 100, max_size + 100)); |
194 runTest(true); | 194 runTest(true); |
195 } | 195 } |
196 | 196 |
197 } // namespace | 197 } // namespace |
198 } // namespace cc | 198 } // namespace cc |
OLD | NEW |