Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Side by Side Diff: cc/scrollbar_layer_unittest.cc

Issue 11348371: cc: Move WebCompositorOutputSurface and related classes into cc/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: forlanding6 Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/resource_update_controller_unittest.cc ('k') | cc/software_output_device.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 EXPECT_EQ(1000, ccScrollbarLayer->totalSize()); 121 EXPECT_EQ(1000, ccScrollbarLayer->totalSize());
122 EXPECT_EQ(300, ccScrollbarLayer->maximum()); 122 EXPECT_EQ(300, ccScrollbarLayer->maximum());
123 123
124 layerImplTreeRoot->scrollBy(gfx::Vector2d(12, 34)); 124 layerImplTreeRoot->scrollBy(gfx::Vector2d(12, 34));
125 125
126 EXPECT_EQ(112, ccScrollbarLayer->currentPos()); 126 EXPECT_EQ(112, ccScrollbarLayer->currentPos());
127 EXPECT_EQ(1000, ccScrollbarLayer->totalSize()); 127 EXPECT_EQ(1000, ccScrollbarLayer->totalSize());
128 EXPECT_EQ(300, ccScrollbarLayer->maximum()); 128 EXPECT_EQ(300, ccScrollbarLayer->maximum());
129 } 129 }
130 130
131 class ScrollbarLayerTestMaxTextureSize : public WebKitTests::ThreadedTest { 131 class ScrollbarLayerTestMaxTextureSize : public ThreadedTest {
132 public: 132 public:
133 ScrollbarLayerTestMaxTextureSize() {} 133 ScrollbarLayerTestMaxTextureSize() {}
134 134
135 void setScrollbarBounds(gfx::Size bounds) { 135 void setScrollbarBounds(gfx::Size bounds) {
136 m_bounds = bounds; 136 m_bounds = bounds;
137 } 137 }
138 138
139 virtual void beginTest() OVERRIDE 139 virtual void beginTest() OVERRIDE
140 { 140 {
141 scoped_ptr<WebKit::WebScrollbar> scrollbar(FakeWebScrollbar::create()); 141 scoped_ptr<WebKit::WebScrollbar> scrollbar(FakeWebScrollbar::create());
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 TEST_F(ScrollbarLayerTestMaxTextureSize, runTest) { 179 TEST_F(ScrollbarLayerTestMaxTextureSize, runTest) {
180 WebKit::FakeWebGraphicsContext3D context; 180 WebKit::FakeWebGraphicsContext3D context;
181 int max_size = 0; 181 int max_size = 0;
182 context.getIntegerv(GL_MAX_TEXTURE_SIZE, &max_size); 182 context.getIntegerv(GL_MAX_TEXTURE_SIZE, &max_size);
183 setScrollbarBounds(gfx::Size(max_size + 100, max_size + 100)); 183 setScrollbarBounds(gfx::Size(max_size + 100, max_size + 100));
184 runTest(true); 184 runTest(true);
185 } 185 }
186 186
187 } // namespace 187 } // namespace
188 } // namespace cc 188 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resource_update_controller_unittest.cc ('k') | cc/software_output_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698