blob: cdb4cc93f862c3fb7eea5aedea5a67e7ed5e9c74 [file] [log] [blame]
[email protected]89583602012-09-18 21:51:411// Copyright 2012 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
[email protected]a8461d82012-10-16 21:11:145#include "cc/scrollbar_layer.h"
[email protected]89583602012-09-18 21:51:416
[email protected]72d0fce2013-02-20 08:11:587#include "cc/append_quads_data.h"
8#include "cc/prioritized_resource_manager.h"
9#include "cc/priority_calculator.h"
10#include "cc/resource_update_queue.h"
[email protected]c4040a522012-10-21 15:01:4011#include "cc/scrollbar_animation_controller.h"
12#include "cc/scrollbar_layer_impl.h"
[email protected]4456eee22012-10-19 18:16:3813#include "cc/single_thread_proxy.h"
[email protected]72d0fce2013-02-20 08:11:5814#include "cc/solid_color_draw_quad.h"
[email protected]586d51ed2012-12-07 20:31:4515#include "cc/test/fake_impl_proxy.h"
[email protected]72d0fce2013-02-20 08:11:5816#include "cc/test/fake_layer_tree_host_client.h"
[email protected]586d51ed2012-12-07 20:31:4517#include "cc/test/fake_layer_tree_host_impl.h"
[email protected]1c7008ac2012-12-18 07:54:1718#include "cc/test/fake_scrollbar_theme_painter.h"
19#include "cc/test/fake_web_scrollbar.h"
[email protected]101441ce2012-10-16 01:45:0320#include "cc/test/fake_web_scrollbar_theme_geometry.h"
[email protected]72d0fce2013-02-20 08:11:5821#include "cc/test/geometry_test_utils.h"
[email protected]9281fc02012-11-28 06:34:4422#include "cc/test/layer_tree_test_common.h"
[email protected]72d0fce2013-02-20 08:11:5823#include "cc/test/mock_quad_culler.h"
[email protected]c8756fbe2013-02-12 01:53:4924#include "cc/test/test_web_graphics_context_3d.h"
[email protected]a8461d82012-10-16 21:11:1425#include "cc/tree_synchronizer.h"
[email protected]72d0fce2013-02-20 08:11:5826#include "testing/gmock/include/gmock/gmock.h"
[email protected]7f0c53db2012-10-02 00:23:1827#include "testing/gtest/include/gtest/gtest.h"
[email protected]920caa52012-12-18 22:39:5028#include "third_party/WebKit/Source/Platform/chromium/public/WebScrollbar.h"
[email protected]1c7008ac2012-12-18 07:54:1729#include "third_party/WebKit/Source/Platform/chromium/public/WebScrollbarThemeGeometry.h"
[email protected]89583602012-09-18 21:51:4130
[email protected]ba565742012-11-10 09:29:4831namespace cc {
[email protected]89583602012-09-18 21:51:4132namespace {
33
[email protected]77766662012-12-20 21:01:5034scoped_ptr<LayerImpl> layerImplForScrollAreaAndScrollbar(
35 FakeLayerTreeHostImpl* host_impl,
36 scoped_ptr<WebKit::WebScrollbar> scrollbar,
37 bool reverse_order)
38{
[email protected]7aba6662013-03-12 10:17:3439 scoped_refptr<Layer> layerTreeRoot = Layer::Create();
40 scoped_refptr<Layer> child1 = Layer::Create();
[email protected]3138b262013-03-08 18:39:0841 scoped_refptr<Layer> child2 = ScrollbarLayer::Create(scrollbar.Pass(), FakeScrollbarThemePainter::Create(false).PassAs<ScrollbarThemePainter>(), FakeWebScrollbarThemeGeometry::create(true), child1->id());
[email protected]7aba6662013-03-12 10:17:3442 layerTreeRoot->AddChild(child1);
43 layerTreeRoot->InsertChild(child2, reverse_order ? 0 : 1);
[email protected]c1bb5af2013-03-13 19:06:2744 scoped_ptr<LayerImpl> layerImpl = TreeSynchronizer::synchronizeTrees(layerTreeRoot.get(), scoped_ptr<LayerImpl>(), host_impl->active_tree());
[email protected]5c4824e12013-01-12 16:34:5345 TreeSynchronizer::pushProperties(layerTreeRoot.get(), layerImpl.get());
46 return layerImpl.Pass();
[email protected]77766662012-12-20 21:01:5047}
48
[email protected]96baf3e2012-10-22 23:09:5549TEST(ScrollbarLayerTest, resolveScrollLayerPointer)
[email protected]89583602012-09-18 21:51:4150{
[email protected]586d51ed2012-12-07 20:31:4551 FakeImplProxy proxy;
52 FakeLayerTreeHostImpl hostImpl(&proxy);
[email protected]89583602012-09-18 21:51:4153
54 {
[email protected]3138b262013-03-08 18:39:0855 scoped_ptr<WebKit::WebScrollbar> scrollbar(FakeWebScrollbar::Create());
[email protected]77766662012-12-20 21:01:5056 scoped_ptr<LayerImpl> layerImplTreeRoot = layerImplForScrollAreaAndScrollbar(&hostImpl, scrollbar.Pass(), false);
[email protected]89583602012-09-18 21:51:4157
[email protected]96baf3e2012-10-22 23:09:5558 LayerImpl* ccChild1 = layerImplTreeRoot->children()[0];
59 ScrollbarLayerImpl* ccChild2 = static_cast<ScrollbarLayerImpl*>(layerImplTreeRoot->children()[1]);
[email protected]89583602012-09-18 21:51:4160
[email protected]7aba6662013-03-12 10:17:3461 EXPECT_EQ(ccChild1->horizontal_scrollbar_layer(), ccChild2);
[email protected]89583602012-09-18 21:51:4162 }
63
64 { // another traverse order
[email protected]3138b262013-03-08 18:39:0865 scoped_ptr<WebKit::WebScrollbar> scrollbar(FakeWebScrollbar::Create());
[email protected]77766662012-12-20 21:01:5066 scoped_ptr<LayerImpl> layerImplTreeRoot = layerImplForScrollAreaAndScrollbar(&hostImpl, scrollbar.Pass(), true);
[email protected]89583602012-09-18 21:51:4167
[email protected]96baf3e2012-10-22 23:09:5568 ScrollbarLayerImpl* ccChild1 = static_cast<ScrollbarLayerImpl*>(layerImplTreeRoot->children()[0]);
69 LayerImpl* ccChild2 = layerImplTreeRoot->children()[1];
[email protected]89583602012-09-18 21:51:4170
[email protected]7aba6662013-03-12 10:17:3471 EXPECT_EQ(ccChild2->horizontal_scrollbar_layer(), ccChild1);
[email protected]89583602012-09-18 21:51:4172 }
73}
74
[email protected]77766662012-12-20 21:01:5075TEST(ScrollbarLayerTest, shouldScrollNonOverlayOnMainThread)
76{
77 FakeImplProxy proxy;
78 FakeLayerTreeHostImpl hostImpl(&proxy);
79
80 // Create and attach a non-overlay scrollbar.
[email protected]3138b262013-03-08 18:39:0881 scoped_ptr<WebKit::WebScrollbar> scrollbar(FakeWebScrollbar::Create());
[email protected]77766662012-12-20 21:01:5082 static_cast<FakeWebScrollbar*>(scrollbar.get())->setOverlay(false);
83 scoped_ptr<LayerImpl> layerImplTreeRoot = layerImplForScrollAreaAndScrollbar(&hostImpl, scrollbar.Pass(), false);
84 ScrollbarLayerImpl* scrollbarLayerImpl = static_cast<ScrollbarLayerImpl*>(layerImplTreeRoot->children()[1]);
85
86 // When the scrollbar is not an overlay scrollbar, the scroll should be
87 // responded to on the main thread as the compositor does not yet implement
88 // scrollbar scrolling.
[email protected]7aba6662013-03-12 10:17:3489 EXPECT_EQ(InputHandlerClient::ScrollOnMainThread, scrollbarLayerImpl->TryScroll(gfx::Point(0, 0), InputHandlerClient::Gesture));
[email protected]77766662012-12-20 21:01:5090
91 // Create and attach an overlay scrollbar.
[email protected]3138b262013-03-08 18:39:0892 scrollbar = FakeWebScrollbar::Create();
[email protected]77766662012-12-20 21:01:5093 static_cast<FakeWebScrollbar*>(scrollbar.get())->setOverlay(true);
94
95 layerImplTreeRoot = layerImplForScrollAreaAndScrollbar(&hostImpl, scrollbar.Pass(), false);
96 scrollbarLayerImpl = static_cast<ScrollbarLayerImpl*>(layerImplTreeRoot->children()[1]);
97
98 // The user shouldn't be able to drag an overlay scrollbar and the scroll
99 // may be handled in the compositor.
[email protected]7aba6662013-03-12 10:17:34100 EXPECT_EQ(InputHandlerClient::ScrollIgnored, scrollbarLayerImpl->TryScroll(gfx::Point(0, 0), InputHandlerClient::Gesture));
[email protected]77766662012-12-20 21:01:50101}
102
[email protected]96baf3e2012-10-22 23:09:55103TEST(ScrollbarLayerTest, scrollOffsetSynchronization)
[email protected]89583602012-09-18 21:51:41104{
[email protected]586d51ed2012-12-07 20:31:45105 FakeImplProxy proxy;
106 FakeLayerTreeHostImpl hostImpl(&proxy);
[email protected]89583602012-09-18 21:51:41107
[email protected]3138b262013-03-08 18:39:08108 scoped_ptr<WebKit::WebScrollbar> scrollbar(FakeWebScrollbar::Create());
[email protected]7aba6662013-03-12 10:17:34109 scoped_refptr<Layer> layerTreeRoot = Layer::Create();
110 scoped_refptr<Layer> contentLayer = Layer::Create();
[email protected]3138b262013-03-08 18:39:08111 scoped_refptr<Layer> scrollbarLayer = ScrollbarLayer::Create(scrollbar.Pass(), FakeScrollbarThemePainter::Create(false).PassAs<ScrollbarThemePainter>(), FakeWebScrollbarThemeGeometry::create(true), layerTreeRoot->id());
[email protected]7aba6662013-03-12 10:17:34112 layerTreeRoot->AddChild(contentLayer);
113 layerTreeRoot->AddChild(scrollbarLayer);
[email protected]89583602012-09-18 21:51:41114
[email protected]7aba6662013-03-12 10:17:34115 layerTreeRoot->SetScrollOffset(gfx::Vector2d(10, 20));
116 layerTreeRoot->SetMaxScrollOffset(gfx::Vector2d(30, 50));
117 layerTreeRoot->SetBounds(gfx::Size(100, 200));
118 contentLayer->SetBounds(gfx::Size(100, 200));
[email protected]89583602012-09-18 21:51:41119
[email protected]c1bb5af2013-03-13 19:06:27120 scoped_ptr<LayerImpl> layerImplTreeRoot = TreeSynchronizer::synchronizeTrees(layerTreeRoot.get(), scoped_ptr<LayerImpl>(), hostImpl.active_tree());
[email protected]5c4824e12013-01-12 16:34:53121 TreeSynchronizer::pushProperties(layerTreeRoot.get(), layerImplTreeRoot.get());
[email protected]89583602012-09-18 21:51:41122
[email protected]96baf3e2012-10-22 23:09:55123 ScrollbarLayerImpl* ccScrollbarLayer = static_cast<ScrollbarLayerImpl*>(layerImplTreeRoot->children()[1]);
[email protected]89583602012-09-18 21:51:41124
[email protected]3138b262013-03-08 18:39:08125 EXPECT_EQ(10, ccScrollbarLayer->CurrentPos());
126 EXPECT_EQ(100, ccScrollbarLayer->TotalSize());
127 EXPECT_EQ(30, ccScrollbarLayer->Maximum());
[email protected]89583602012-09-18 21:51:41128
[email protected]7aba6662013-03-12 10:17:34129 layerTreeRoot->SetScrollOffset(gfx::Vector2d(100, 200));
130 layerTreeRoot->SetMaxScrollOffset(gfx::Vector2d(300, 500));
131 layerTreeRoot->SetBounds(gfx::Size(1000, 2000));
132 contentLayer->SetBounds(gfx::Size(1000, 2000));
[email protected]89583602012-09-18 21:51:41133
[email protected]7aba6662013-03-12 10:17:34134 ScrollbarAnimationController* scrollbarController = layerImplTreeRoot->scrollbar_animation_controller();
[email protected]c1bb5af2013-03-13 19:06:27135 layerImplTreeRoot = TreeSynchronizer::synchronizeTrees(layerTreeRoot.get(), layerImplTreeRoot.Pass(), hostImpl.active_tree());
[email protected]5c4824e12013-01-12 16:34:53136 TreeSynchronizer::pushProperties(layerTreeRoot.get(), layerImplTreeRoot.get());
[email protected]7aba6662013-03-12 10:17:34137 EXPECT_EQ(scrollbarController, layerImplTreeRoot->scrollbar_animation_controller());
[email protected]89583602012-09-18 21:51:41138
[email protected]3138b262013-03-08 18:39:08139 EXPECT_EQ(100, ccScrollbarLayer->CurrentPos());
140 EXPECT_EQ(1000, ccScrollbarLayer->TotalSize());
141 EXPECT_EQ(300, ccScrollbarLayer->Maximum());
[email protected]89583602012-09-18 21:51:41142
[email protected]7aba6662013-03-12 10:17:34143 layerImplTreeRoot->ScrollBy(gfx::Vector2d(12, 34));
[email protected]89583602012-09-18 21:51:41144
[email protected]3138b262013-03-08 18:39:08145 EXPECT_EQ(112, ccScrollbarLayer->CurrentPos());
146 EXPECT_EQ(1000, ccScrollbarLayer->TotalSize());
147 EXPECT_EQ(300, ccScrollbarLayer->Maximum());
[email protected]89583602012-09-18 21:51:41148}
149
[email protected]72d0fce2013-02-20 08:11:58150TEST(ScrollbarLayerTest, solidColorThicknessOverride)
151{
152 LayerTreeSettings layerTreeSettings;
153 layerTreeSettings.solidColorScrollbars = true;
154 layerTreeSettings.solidColorScrollbarThicknessDIP = 3;
155 FakeImplProxy proxy;
156 FakeLayerTreeHostImpl hostImpl(layerTreeSettings, &proxy);
157
[email protected]3138b262013-03-08 18:39:08158 scoped_ptr<WebKit::WebScrollbar> scrollbar(FakeWebScrollbar::Create());
[email protected]72d0fce2013-02-20 08:11:58159 static_cast<FakeWebScrollbar*>(scrollbar.get())->setOverlay(true);
160 scoped_ptr<LayerImpl> layerImplTreeRoot = layerImplForScrollAreaAndScrollbar(&hostImpl, scrollbar.Pass(), false);
161 ScrollbarLayerImpl* scrollbarLayerImpl = static_cast<ScrollbarLayerImpl*>(layerImplTreeRoot->children()[1]);
[email protected]3138b262013-03-08 18:39:08162 scrollbarLayerImpl->SetThumbSize(gfx::Size(4, 4));
[email protected]72d0fce2013-02-20 08:11:58163
164 // Thickness should be overridden to 3.
165 {
166 MockQuadCuller quadCuller;
167 AppendQuadsData data;
[email protected]7aba6662013-03-12 10:17:34168 scrollbarLayerImpl->AppendQuads(&quadCuller, &data);
[email protected]72d0fce2013-02-20 08:11:58169
170 const QuadList& quads = quadCuller.quadList();
171 ASSERT_EQ(1, quads.size());
172 EXPECT_EQ(DrawQuad::SOLID_COLOR, quads[0]->material);
173 EXPECT_RECT_EQ(gfx::Rect(1, 0, 4, 3), quads[0]->rect);
174 }
175
176 // Contents scale should scale the draw quad.
[email protected]7aba6662013-03-12 10:17:34177 scrollbarLayerImpl->draw_properties().contents_scale_x = 2;
178 scrollbarLayerImpl->draw_properties().contents_scale_y = 2;
[email protected]72d0fce2013-02-20 08:11:58179 {
180 MockQuadCuller quadCuller;
181 AppendQuadsData data;
[email protected]7aba6662013-03-12 10:17:34182 scrollbarLayerImpl->AppendQuads(&quadCuller, &data);
[email protected]72d0fce2013-02-20 08:11:58183
184 const QuadList& quads = quadCuller.quadList();
185 ASSERT_EQ(1, quads.size());
186 EXPECT_EQ(DrawQuad::SOLID_COLOR, quads[0]->material);
187 EXPECT_RECT_EQ(gfx::Rect(2, 0, 8, 6), quads[0]->rect);
188 }
189
190}
191
[email protected]a46f32932012-12-07 21:43:16192class ScrollbarLayerTestMaxTextureSize : public ThreadedTest {
[email protected]9281fc02012-11-28 06:34:44193public:
194 ScrollbarLayerTestMaxTextureSize() {}
195
196 void setScrollbarBounds(gfx::Size bounds) {
[email protected]7aba6662013-03-12 10:17:34197 bounds_ = bounds;
[email protected]9281fc02012-11-28 06:34:44198 }
199
200 virtual void beginTest() OVERRIDE
201 {
[email protected]804c8982013-03-13 16:32:21202 m_layerTreeHost->InitializeRendererIfNeeded();
[email protected]344e58d02012-12-16 04:52:53203
[email protected]3138b262013-03-08 18:39:08204 scoped_ptr<WebKit::WebScrollbar> scrollbar(FakeWebScrollbar::Create());
205 m_scrollbarLayer = ScrollbarLayer::Create(scrollbar.Pass(), FakeScrollbarThemePainter::Create(false).PassAs<ScrollbarThemePainter>(), FakeWebScrollbarThemeGeometry::create(true), 1);
[email protected]7aba6662013-03-12 10:17:34206 m_scrollbarLayer->SetLayerTreeHost(m_layerTreeHost.get());
207 m_scrollbarLayer->SetBounds(bounds_);
[email protected]804c8982013-03-13 16:32:21208 m_layerTreeHost->root_layer()->AddChild(m_scrollbarLayer);
[email protected]9281fc02012-11-28 06:34:44209
[email protected]7aba6662013-03-12 10:17:34210 m_scrollLayer = Layer::Create();
[email protected]3138b262013-03-08 18:39:08211 m_scrollbarLayer->SetScrollLayerId(m_scrollLayer->id());
[email protected]804c8982013-03-13 16:32:21212 m_layerTreeHost->root_layer()->AddChild(m_scrollLayer);
[email protected]9281fc02012-11-28 06:34:44213
214 postSetNeedsCommitToMainThread();
215 }
216
217 virtual void commitCompleteOnThread(LayerTreeHostImpl* impl) OVERRIDE
218 {
[email protected]c1bb5af2013-03-13 19:06:27219 const int kMaxTextureSize = impl->GetRendererCapabilities().max_texture_size;
[email protected]9281fc02012-11-28 06:34:44220
221 // Check first that we're actually testing something.
222 EXPECT_GT(m_scrollbarLayer->bounds().width(), kMaxTextureSize);
223
[email protected]7aba6662013-03-12 10:17:34224 EXPECT_EQ(m_scrollbarLayer->content_bounds().width(), kMaxTextureSize - 1);
225 EXPECT_EQ(m_scrollbarLayer->content_bounds().height(), kMaxTextureSize - 1);
[email protected]9281fc02012-11-28 06:34:44226
227 endTest();
228 }
229
230 virtual void afterTest() OVERRIDE
231 {
232 }
233
234private:
235 scoped_refptr<ScrollbarLayer> m_scrollbarLayer;
236 scoped_refptr<Layer> m_scrollLayer;
[email protected]7aba6662013-03-12 10:17:34237 gfx::Size bounds_;
[email protected]9281fc02012-11-28 06:34:44238};
239
240TEST_F(ScrollbarLayerTestMaxTextureSize, runTest) {
[email protected]c8756fbe2013-02-12 01:53:49241 scoped_ptr<TestWebGraphicsContext3D> context = TestWebGraphicsContext3D::Create();
[email protected]9281fc02012-11-28 06:34:44242 int max_size = 0;
[email protected]501a7702012-12-19 05:25:05243 context->getIntegerv(GL_MAX_TEXTURE_SIZE, &max_size);
[email protected]9281fc02012-11-28 06:34:44244 setScrollbarBounds(gfx::Size(max_size + 100, max_size + 100));
245 runTest(true);
246}
247
[email protected]72d0fce2013-02-20 08:11:58248class MockLayerTreeHost : public LayerTreeHost {
249public:
250 MockLayerTreeHost(const LayerTreeSettings& settings)
251 : LayerTreeHost(&m_fakeClient, settings)
252 {
[email protected]804c8982013-03-13 16:32:21253 Initialize(scoped_ptr<Thread>(NULL));
[email protected]72d0fce2013-02-20 08:11:58254 }
255
256private:
257 FakeLayerImplTreeHostClient m_fakeClient;
258};
259
260
261class ScrollbarLayerTestResourceCreation : public testing::Test {
262public:
263 ScrollbarLayerTestResourceCreation()
264 {
265 }
266
267 void testResourceUpload(int expectedResources)
268 {
269 m_layerTreeHost.reset(new MockLayerTreeHost(m_layerTreeSettings));
270
[email protected]3138b262013-03-08 18:39:08271 scoped_ptr<WebKit::WebScrollbar> scrollbar(FakeWebScrollbar::Create());
[email protected]7aba6662013-03-12 10:17:34272 scoped_refptr<Layer> layerTreeRoot = Layer::Create();
273 scoped_refptr<Layer> contentLayer = Layer::Create();
[email protected]3138b262013-03-08 18:39:08274 scoped_refptr<Layer> scrollbarLayer = ScrollbarLayer::Create(scrollbar.Pass(), FakeScrollbarThemePainter::Create(false).PassAs<ScrollbarThemePainter>(), FakeWebScrollbarThemeGeometry::create(true), layerTreeRoot->id());
[email protected]7aba6662013-03-12 10:17:34275 layerTreeRoot->AddChild(contentLayer);
276 layerTreeRoot->AddChild(scrollbarLayer);
[email protected]72d0fce2013-02-20 08:11:58277
[email protected]804c8982013-03-13 16:32:21278 m_layerTreeHost->InitializeRendererIfNeeded();
279 m_layerTreeHost->contents_texture_manager()->setMaxMemoryLimitBytes(1024 * 1024);
280 m_layerTreeHost->SetRootLayer(layerTreeRoot);
[email protected]72d0fce2013-02-20 08:11:58281
[email protected]7aba6662013-03-12 10:17:34282 scrollbarLayer->SetIsDrawable(true);
283 scrollbarLayer->SetBounds(gfx::Size(100, 100));
284 layerTreeRoot->SetScrollOffset(gfx::Vector2d(10, 20));
285 layerTreeRoot->SetMaxScrollOffset(gfx::Vector2d(30, 50));
286 layerTreeRoot->SetBounds(gfx::Size(100, 200));
287 contentLayer->SetBounds(gfx::Size(100, 200));
288 scrollbarLayer->draw_properties().content_bounds = gfx::Size(100, 200);
289 scrollbarLayer->draw_properties().visible_content_rect = gfx::Rect(0, 0, 100, 200);
290 scrollbarLayer->CreateRenderSurface();
291 scrollbarLayer->draw_properties().render_target = scrollbarLayer;
[email protected]72d0fce2013-02-20 08:11:58292
293 testing::Mock::VerifyAndClearExpectations(m_layerTreeHost.get());
[email protected]7aba6662013-03-12 10:17:34294 EXPECT_EQ(scrollbarLayer->layer_tree_host(), m_layerTreeHost.get());
[email protected]72d0fce2013-02-20 08:11:58295
296 PriorityCalculator calculator;
297 ResourceUpdateQueue queue;
298 OcclusionTracker occlusionTracker(gfx::Rect(), false);
299
[email protected]7aba6662013-03-12 10:17:34300 scrollbarLayer->SetTexturePriorities(calculator);
[email protected]804c8982013-03-13 16:32:21301 m_layerTreeHost->contents_texture_manager()->prioritizeTextures();
[email protected]7aba6662013-03-12 10:17:34302 scrollbarLayer->Update(&queue, &occlusionTracker, NULL);
[email protected]72d0fce2013-02-20 08:11:58303 EXPECT_EQ(0, queue.fullUploadSize());
304 EXPECT_EQ(expectedResources, queue.partialUploadSize());
305
306 testing::Mock::VerifyAndClearExpectations(m_layerTreeHost.get());
307 }
308
309protected:
310 scoped_ptr<MockLayerTreeHost> m_layerTreeHost;
311 LayerTreeSettings m_layerTreeSettings;
312};
313
314TEST_F(ScrollbarLayerTestResourceCreation, resourceUpload)
315{
316 m_layerTreeSettings.solidColorScrollbars = false;
317 testResourceUpload(2);
318}
319
320TEST_F(ScrollbarLayerTestResourceCreation, solidColorNoResourceUpload)
321{
322 m_layerTreeSettings.solidColorScrollbars = true;
323 testResourceUpload(0);
324}
325
[email protected]ba565742012-11-10 09:29:48326} // namespace
327} // namespace cc