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

Side by Side Diff: cc/layers/scrollbar_layer_unittest.cc

Issue 234603002: Add support for setting TrackStart on solid color layers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix more unit test compile Created 6 years, 8 months 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
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 "base/containers/hash_tables.h" 5 #include "base/containers/hash_tables.h"
6 #include "cc/animation/scrollbar_animation_controller.h" 6 #include "cc/animation/scrollbar_animation_controller.h"
7 #include "cc/layers/append_quads_data.h" 7 #include "cc/layers/append_quads_data.h"
8 #include "cc/layers/painted_scrollbar_layer.h" 8 #include "cc/layers/painted_scrollbar_layer.h"
9 #include "cc/layers/painted_scrollbar_layer_impl.h" 9 #include "cc/layers/painted_scrollbar_layer_impl.h"
10 #include "cc/layers/scrollbar_layer_interface.h" 10 #include "cc/layers/scrollbar_layer_interface.h"
(...skipping 15 matching lines...) Expand all
26 #include "cc/trees/layer_tree_impl.h" 26 #include "cc/trees/layer_tree_impl.h"
27 #include "cc/trees/occlusion_tracker.h" 27 #include "cc/trees/occlusion_tracker.h"
28 #include "cc/trees/single_thread_proxy.h" 28 #include "cc/trees/single_thread_proxy.h"
29 #include "cc/trees/tree_synchronizer.h" 29 #include "cc/trees/tree_synchronizer.h"
30 #include "testing/gmock/include/gmock/gmock.h" 30 #include "testing/gmock/include/gmock/gmock.h"
31 #include "testing/gtest/include/gtest/gtest.h" 31 #include "testing/gtest/include/gtest/gtest.h"
32 32
33 namespace cc { 33 namespace cc {
34 namespace { 34 namespace {
35 35
36 LayerImpl* LayerImplForScrollAreaAndScrollbar( 36 LayerImpl* LayerImplForScrollAreaAndScrollbar(FakeLayerTreeHost* host,
37 FakeLayerTreeHost* host, 37 scoped_ptr<Scrollbar> scrollbar,
38 scoped_ptr<Scrollbar> scrollbar, 38 bool reverse_order,
39 bool reverse_order, 39 bool use_solid_color_scrollbar,
40 bool use_solid_color_scrollbar, 40 int thumb_thickness,
41 int thumb_thickness) { 41 int track_start) {
42 scoped_refptr<Layer> layer_tree_root = Layer::Create(); 42 scoped_refptr<Layer> layer_tree_root = Layer::Create();
43 scoped_refptr<Layer> child1 = Layer::Create(); 43 scoped_refptr<Layer> child1 = Layer::Create();
44 scoped_refptr<Layer> child2; 44 scoped_refptr<Layer> child2;
45 if (use_solid_color_scrollbar) { 45 if (use_solid_color_scrollbar) {
46 const bool kIsLeftSideVerticalScrollbar = false; 46 const bool kIsLeftSideVerticalScrollbar = false;
47 child2 = SolidColorScrollbarLayer::Create( 47 child2 = SolidColorScrollbarLayer::Create(scrollbar->Orientation(),
48 scrollbar->Orientation(), thumb_thickness, 48 thumb_thickness,
49 kIsLeftSideVerticalScrollbar, child1->id()); 49 track_start,
50 kIsLeftSideVerticalScrollbar,
51 child1->id());
50 } else { 52 } else {
51 child2 = PaintedScrollbarLayer::Create(scrollbar.Pass(), child1->id()); 53 child2 = PaintedScrollbarLayer::Create(scrollbar.Pass(), child1->id());
52 } 54 }
53 layer_tree_root->AddChild(child1); 55 layer_tree_root->AddChild(child1);
54 layer_tree_root->InsertChild(child2, reverse_order ? 0 : 1); 56 layer_tree_root->InsertChild(child2, reverse_order ? 0 : 1);
55 host->SetRootLayer(layer_tree_root); 57 host->SetRootLayer(layer_tree_root);
56 return host->CommitAndCreateLayerImplTree(); 58 return host->CommitAndCreateLayerImplTree();
57 } 59 }
58 60
59 TEST(ScrollbarLayerTest, ResolveScrollLayerPointer) { 61 TEST(ScrollbarLayerTest, ResolveScrollLayerPointer) {
60 scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create(); 62 scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
61 scoped_ptr<Scrollbar> scrollbar(new FakeScrollbar); 63 scoped_ptr<Scrollbar> scrollbar(new FakeScrollbar);
62 LayerImpl* layer_impl_tree_root = LayerImplForScrollAreaAndScrollbar( 64 LayerImpl* layer_impl_tree_root = LayerImplForScrollAreaAndScrollbar(
63 host.get(), scrollbar.Pass(), false, false, 0); 65 host.get(), scrollbar.Pass(), false, false, 0, 0);
64 66
65 LayerImpl* cc_child1 = layer_impl_tree_root->children()[0]; 67 LayerImpl* cc_child1 = layer_impl_tree_root->children()[0];
66 PaintedScrollbarLayerImpl* cc_child2 = 68 PaintedScrollbarLayerImpl* cc_child2 =
67 static_cast<PaintedScrollbarLayerImpl*>( 69 static_cast<PaintedScrollbarLayerImpl*>(
68 layer_impl_tree_root->children()[1]); 70 layer_impl_tree_root->children()[1]);
69 71
70 EXPECT_EQ(cc_child1->scrollbars()->size(), 1UL); 72 EXPECT_EQ(cc_child1->scrollbars()->size(), 1UL);
71 EXPECT_EQ(*(cc_child1->scrollbars()->begin()), cc_child2); 73 EXPECT_EQ(*(cc_child1->scrollbars()->begin()), cc_child2);
72 } 74 }
73 75
74 TEST(ScrollbarLayerTest, ResolveScrollLayerPointer_ReverseOrder) { 76 TEST(ScrollbarLayerTest, ResolveScrollLayerPointer_ReverseOrder) {
75 scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create(); 77 scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
76 scoped_ptr<Scrollbar> scrollbar(new FakeScrollbar); 78 scoped_ptr<Scrollbar> scrollbar(new FakeScrollbar);
77 LayerImpl* layer_impl_tree_root = LayerImplForScrollAreaAndScrollbar( 79 LayerImpl* layer_impl_tree_root = LayerImplForScrollAreaAndScrollbar(
78 host.get(), scrollbar.Pass(), true, false, 0); 80 host.get(), scrollbar.Pass(), true, false, 0, 0);
79 81
80 PaintedScrollbarLayerImpl* cc_child1 = 82 PaintedScrollbarLayerImpl* cc_child1 =
81 static_cast<PaintedScrollbarLayerImpl*>( 83 static_cast<PaintedScrollbarLayerImpl*>(
82 layer_impl_tree_root->children()[0]); 84 layer_impl_tree_root->children()[0]);
83 LayerImpl* cc_child2 = layer_impl_tree_root->children()[1]; 85 LayerImpl* cc_child2 = layer_impl_tree_root->children()[1];
84 86
85 EXPECT_EQ(cc_child2->scrollbars()->size(), 1UL); 87 EXPECT_EQ(cc_child2->scrollbars()->size(), 1UL);
86 EXPECT_EQ(*(cc_child2->scrollbars()->begin()), cc_child1); 88 EXPECT_EQ(*(cc_child2->scrollbars()->begin()), cc_child1);
87 } 89 }
88 90
89 TEST(ScrollbarLayerTest, ShouldScrollNonOverlayOnMainThread) { 91 TEST(ScrollbarLayerTest, ShouldScrollNonOverlayOnMainThread) {
90 scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create(); 92 scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
91 93
92 // Create and attach a non-overlay scrollbar. 94 // Create and attach a non-overlay scrollbar.
93 scoped_ptr<Scrollbar> scrollbar(new FakeScrollbar); 95 scoped_ptr<Scrollbar> scrollbar(new FakeScrollbar);
94 LayerImpl* layer_impl_tree_root = LayerImplForScrollAreaAndScrollbar( 96 LayerImpl* layer_impl_tree_root = LayerImplForScrollAreaAndScrollbar(
95 host.get(), scrollbar.Pass(), false, false, 0); 97 host.get(), scrollbar.Pass(), false, false, 0, 0);
96 PaintedScrollbarLayerImpl* scrollbar_layer_impl = 98 PaintedScrollbarLayerImpl* scrollbar_layer_impl =
97 static_cast<PaintedScrollbarLayerImpl*>( 99 static_cast<PaintedScrollbarLayerImpl*>(
98 layer_impl_tree_root->children()[1]); 100 layer_impl_tree_root->children()[1]);
99 101
100 // When the scrollbar is not an overlay scrollbar, the scroll should be 102 // When the scrollbar is not an overlay scrollbar, the scroll should be
101 // responded to on the main thread as the compositor does not yet implement 103 // responded to on the main thread as the compositor does not yet implement
102 // scrollbar scrolling. 104 // scrollbar scrolling.
103 EXPECT_EQ(InputHandler::ScrollOnMainThread, 105 EXPECT_EQ(InputHandler::ScrollOnMainThread,
104 scrollbar_layer_impl->TryScroll(gfx::Point(0, 0), 106 scrollbar_layer_impl->TryScroll(gfx::Point(0, 0),
105 InputHandler::Gesture)); 107 InputHandler::Gesture));
106 108
107 // Create and attach an overlay scrollbar. 109 // Create and attach an overlay scrollbar.
108 scrollbar.reset(new FakeScrollbar(false, false, true)); 110 scrollbar.reset(new FakeScrollbar(false, false, true));
109 111
110 layer_impl_tree_root = LayerImplForScrollAreaAndScrollbar( 112 layer_impl_tree_root = LayerImplForScrollAreaAndScrollbar(
111 host.get(), scrollbar.Pass(), false, false, 0); 113 host.get(), scrollbar.Pass(), false, false, 0, 0);
112 scrollbar_layer_impl = static_cast<PaintedScrollbarLayerImpl*>( 114 scrollbar_layer_impl = static_cast<PaintedScrollbarLayerImpl*>(
113 layer_impl_tree_root->children()[1]); 115 layer_impl_tree_root->children()[1]);
114 116
115 // The user shouldn't be able to drag an overlay scrollbar and the scroll 117 // The user shouldn't be able to drag an overlay scrollbar and the scroll
116 // may be handled in the compositor. 118 // may be handled in the compositor.
117 EXPECT_EQ(InputHandler::ScrollIgnored, 119 EXPECT_EQ(InputHandler::ScrollIgnored,
118 scrollbar_layer_impl->TryScroll(gfx::Point(0, 0), 120 scrollbar_layer_impl->TryScroll(gfx::Point(0, 0),
119 InputHandler::Gesture)); 121 InputHandler::Gesture));
120 } 122 }
121 123
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 // position). 266 // position).
265 scrollbar_layer->fake_scrollbar()->set_track_rect(gfx::Rect(30, 12, 50, 6)); 267 scrollbar_layer->fake_scrollbar()->set_track_rect(gfx::Rect(30, 12, 50, 6));
266 268
267 UPDATE_AND_EXTRACT_LAYER_POINTERS(); 269 UPDATE_AND_EXTRACT_LAYER_POINTERS();
268 EXPECT_EQ(gfx::Rect(44, 0, 6, 4).ToString(), 270 EXPECT_EQ(gfx::Rect(44, 0, 6, 4).ToString(),
269 scrollbar_layer_impl->ComputeThumbQuadRect().ToString()); 271 scrollbar_layer_impl->ComputeThumbQuadRect().ToString());
270 } 272 }
271 273
272 TEST(ScrollbarLayerTest, SolidColorDrawQuads) { 274 TEST(ScrollbarLayerTest, SolidColorDrawQuads) {
273 const int kThumbThickness = 3; 275 const int kThumbThickness = 3;
276 const int kTrackStart = 0;
274 const int kTrackLength = 100; 277 const int kTrackLength = 100;
275 278
276 LayerTreeSettings layer_tree_settings; 279 LayerTreeSettings layer_tree_settings;
277 scoped_ptr<FakeLayerTreeHost> host = 280 scoped_ptr<FakeLayerTreeHost> host =
278 FakeLayerTreeHost::Create(layer_tree_settings); 281 FakeLayerTreeHost::Create(layer_tree_settings);
279 282
280 scoped_ptr<Scrollbar> scrollbar(new FakeScrollbar(false, true, true)); 283 scoped_ptr<Scrollbar> scrollbar(new FakeScrollbar(false, true, true));
281 LayerImpl* layer_impl_tree_root = LayerImplForScrollAreaAndScrollbar( 284 LayerImpl* layer_impl_tree_root = LayerImplForScrollAreaAndScrollbar(
282 host.get(), scrollbar.Pass(), false, true, kThumbThickness); 285 host.get(), scrollbar.Pass(), false, true, kThumbThickness, kTrackStart);
283 ScrollbarLayerImplBase* scrollbar_layer_impl = 286 ScrollbarLayerImplBase* scrollbar_layer_impl =
284 static_cast<SolidColorScrollbarLayerImpl*>( 287 static_cast<SolidColorScrollbarLayerImpl*>(
285 layer_impl_tree_root->children()[1]); 288 layer_impl_tree_root->children()[1]);
286 scrollbar_layer_impl->SetBounds(gfx::Size(kTrackLength, kThumbThickness)); 289 scrollbar_layer_impl->SetBounds(gfx::Size(kTrackLength, kThumbThickness));
287 scrollbar_layer_impl->SetCurrentPos(10.f); 290 scrollbar_layer_impl->SetCurrentPos(10.f);
288 scrollbar_layer_impl->SetMaximum(100); 291 scrollbar_layer_impl->SetMaximum(100);
289 scrollbar_layer_impl->SetVisibleToTotalLengthRatio(0.4f); 292 scrollbar_layer_impl->SetVisibleToTotalLengthRatio(0.4f);
290 293
291 // Thickness should be overridden to 3. 294 // Thickness should be overridden to 3.
292 { 295 {
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 329
327 const QuadList& quads = quad_culler.quad_list(); 330 const QuadList& quads = quad_culler.quad_list();
328 ASSERT_EQ(1u, quads.size()); 331 ASSERT_EQ(1u, quads.size());
329 EXPECT_EQ(DrawQuad::SOLID_COLOR, quads[0]->material); 332 EXPECT_EQ(DrawQuad::SOLID_COLOR, quads[0]->material);
330 EXPECT_RECT_EQ(gfx::Rect(8, 0, 20, 3), quads[0]->rect); 333 EXPECT_RECT_EQ(gfx::Rect(8, 0, 20, 3), quads[0]->rect);
331 } 334 }
332 } 335 }
333 336
334 TEST(ScrollbarLayerTest, LayerDrivenSolidColorDrawQuads) { 337 TEST(ScrollbarLayerTest, LayerDrivenSolidColorDrawQuads) {
335 const int kThumbThickness = 3; 338 const int kThumbThickness = 3;
339 const int kTrackStart = 0;
336 const int kTrackLength = 10; 340 const int kTrackLength = 10;
337 341
338 LayerTreeSettings layer_tree_settings; 342 LayerTreeSettings layer_tree_settings;
339 scoped_ptr<FakeLayerTreeHost> host = 343 scoped_ptr<FakeLayerTreeHost> host =
340 FakeLayerTreeHost::Create(layer_tree_settings); 344 FakeLayerTreeHost::Create(layer_tree_settings);
341 345
342 scoped_ptr<Scrollbar> scrollbar(new FakeScrollbar(false, true, true)); 346 scoped_ptr<Scrollbar> scrollbar(new FakeScrollbar(false, true, true));
343 347
344 { 348 {
345 scoped_refptr<Layer> layer_tree_root = Layer::Create(); 349 scoped_refptr<Layer> layer_tree_root = Layer::Create();
346 scoped_refptr<Layer> scroll_layer = Layer::Create(); 350 scoped_refptr<Layer> scroll_layer = Layer::Create();
347 scroll_layer->SetScrollClipLayerId(layer_tree_root->id()); 351 scroll_layer->SetScrollClipLayerId(layer_tree_root->id());
348 scoped_refptr<Layer> child1 = Layer::Create(); 352 scoped_refptr<Layer> child1 = Layer::Create();
349 scoped_refptr<Layer> child2; 353 scoped_refptr<Layer> child2;
350 const bool kIsLeftSideVerticalScrollbar = false; 354 const bool kIsLeftSideVerticalScrollbar = false;
351 child2 = SolidColorScrollbarLayer::Create(scrollbar->Orientation(), 355 child2 = SolidColorScrollbarLayer::Create(scrollbar->Orientation(),
352 kThumbThickness, 356 kThumbThickness,
357 kTrackStart,
353 kIsLeftSideVerticalScrollbar, 358 kIsLeftSideVerticalScrollbar,
354 child1->id()); 359 child1->id());
355 child2->ToScrollbarLayer()->SetScrollLayer(scroll_layer->id()); 360 child2->ToScrollbarLayer()->SetScrollLayer(scroll_layer->id());
356 child2->ToScrollbarLayer()->SetClipLayer(layer_tree_root->id()); 361 child2->ToScrollbarLayer()->SetClipLayer(layer_tree_root->id());
357 scroll_layer->AddChild(child1); 362 scroll_layer->AddChild(child1);
358 scroll_layer->InsertChild(child2, 1); 363 scroll_layer->InsertChild(child2, 1);
359 layer_tree_root->AddChild(scroll_layer); 364 layer_tree_root->AddChild(scroll_layer);
360 host->SetRootLayer(layer_tree_root); 365 host->SetRootLayer(layer_tree_root);
361 } 366 }
362 LayerImpl* layer_impl_tree_root = host->CommitAndCreateLayerImplTree(); 367 LayerImpl* layer_impl_tree_root = host->CommitAndCreateLayerImplTree();
(...skipping 24 matching lines...) Expand all
387 } 392 }
388 393
389 class ScrollbarLayerSolidColorThumbTest : public testing::Test { 394 class ScrollbarLayerSolidColorThumbTest : public testing::Test {
390 public: 395 public:
391 ScrollbarLayerSolidColorThumbTest() { 396 ScrollbarLayerSolidColorThumbTest() {
392 LayerTreeSettings layer_tree_settings; 397 LayerTreeSettings layer_tree_settings;
393 host_impl_.reset(new FakeLayerTreeHostImpl( 398 host_impl_.reset(new FakeLayerTreeHostImpl(
394 layer_tree_settings, &proxy_, &shared_bitmap_manager_)); 399 layer_tree_settings, &proxy_, &shared_bitmap_manager_));
395 400
396 const int kThumbThickness = 3; 401 const int kThumbThickness = 3;
402 const int kTrackStart = 0;
397 const bool kIsLeftSideVerticalScrollbar = false; 403 const bool kIsLeftSideVerticalScrollbar = false;
398 const bool kIsOverlayScrollbar = false; 404 const bool kIsOverlayScrollbar = false;
399 405
400 horizontal_scrollbar_layer_ = 406 horizontal_scrollbar_layer_ =
401 SolidColorScrollbarLayerImpl::Create(host_impl_->active_tree(), 407 SolidColorScrollbarLayerImpl::Create(host_impl_->active_tree(),
402 1, 408 1,
403 HORIZONTAL, 409 HORIZONTAL,
404 kThumbThickness, 410 kThumbThickness,
411 kTrackStart,
405 kIsLeftSideVerticalScrollbar, 412 kIsLeftSideVerticalScrollbar,
406 kIsOverlayScrollbar); 413 kIsOverlayScrollbar);
407 vertical_scrollbar_layer_ = 414 vertical_scrollbar_layer_ =
408 SolidColorScrollbarLayerImpl::Create(host_impl_->active_tree(), 415 SolidColorScrollbarLayerImpl::Create(host_impl_->active_tree(),
409 2, 416 2,
410 VERTICAL, 417 VERTICAL,
411 kThumbThickness, 418 kThumbThickness,
419 kTrackStart,
412 kIsLeftSideVerticalScrollbar, 420 kIsLeftSideVerticalScrollbar,
413 kIsOverlayScrollbar); 421 kIsOverlayScrollbar);
414 } 422 }
415 423
416 protected: 424 protected:
417 FakeImplProxy proxy_; 425 FakeImplProxy proxy_;
418 TestSharedBitmapManager shared_bitmap_manager_; 426 TestSharedBitmapManager shared_bitmap_manager_;
419 scoped_ptr<FakeLayerTreeHostImpl> host_impl_; 427 scoped_ptr<FakeLayerTreeHostImpl> host_impl_;
420 scoped_ptr<SolidColorScrollbarLayerImpl> horizontal_scrollbar_layer_; 428 scoped_ptr<SolidColorScrollbarLayerImpl> horizontal_scrollbar_layer_;
421 scoped_ptr<SolidColorScrollbarLayerImpl> vertical_scrollbar_layer_; 429 scoped_ptr<SolidColorScrollbarLayerImpl> vertical_scrollbar_layer_;
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 bool use_solid_color_scrollbar) { 625 bool use_solid_color_scrollbar) {
618 layer_tree_host_.reset( 626 layer_tree_host_.reset(
619 new MockLayerTreeHost(&fake_client_, layer_tree_settings_)); 627 new MockLayerTreeHost(&fake_client_, layer_tree_settings_));
620 628
621 scoped_ptr<Scrollbar> scrollbar(new FakeScrollbar(false, true, false)); 629 scoped_ptr<Scrollbar> scrollbar(new FakeScrollbar(false, true, false));
622 scoped_refptr<Layer> layer_tree_root = Layer::Create(); 630 scoped_refptr<Layer> layer_tree_root = Layer::Create();
623 scoped_refptr<Layer> content_layer = Layer::Create(); 631 scoped_refptr<Layer> content_layer = Layer::Create();
624 scoped_refptr<Layer> scrollbar_layer; 632 scoped_refptr<Layer> scrollbar_layer;
625 if (use_solid_color_scrollbar) { 633 if (use_solid_color_scrollbar) {
626 const int kThumbThickness = 3; 634 const int kThumbThickness = 3;
635 const int kTrackStart = 0;
627 const bool kIsLeftSideVerticalScrollbar = false; 636 const bool kIsLeftSideVerticalScrollbar = false;
628 scrollbar_layer = 637 scrollbar_layer =
629 SolidColorScrollbarLayer::Create(scrollbar->Orientation(), 638 SolidColorScrollbarLayer::Create(scrollbar->Orientation(),
630 kThumbThickness, 639 kThumbThickness,
640 kTrackStart,
631 kIsLeftSideVerticalScrollbar, 641 kIsLeftSideVerticalScrollbar,
632 layer_tree_root->id()); 642 layer_tree_root->id());
633 } else { 643 } else {
634 scrollbar_layer = PaintedScrollbarLayer::Create(scrollbar.Pass(), 644 scrollbar_layer = PaintedScrollbarLayer::Create(scrollbar.Pass(),
635 layer_tree_root->id()); 645 layer_tree_root->id());
636 } 646 }
637 layer_tree_root->AddChild(content_layer); 647 layer_tree_root->AddChild(content_layer);
638 layer_tree_root->AddChild(scrollbar_layer); 648 layer_tree_root->AddChild(scrollbar_layer);
639 649
640 layer_tree_host_->SetRootLayer(layer_tree_root); 650 layer_tree_host_->SetRootLayer(layer_tree_root);
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
873 TestScale(gfx::Rect(1240, 0, 15, 1333), 2.7754839f); 883 TestScale(gfx::Rect(1240, 0, 15, 1333), 2.7754839f);
874 TestScale(gfx::Rect(1240, 0, 15, 677), 2.46677136f); 884 TestScale(gfx::Rect(1240, 0, 15, 677), 2.46677136f);
875 885
876 // Horizontal Scrollbars. 886 // Horizontal Scrollbars.
877 TestScale(gfx::Rect(0, 1240, 1333, 15), 2.7754839f); 887 TestScale(gfx::Rect(0, 1240, 1333, 15), 2.7754839f);
878 TestScale(gfx::Rect(0, 1240, 677, 15), 2.46677136f); 888 TestScale(gfx::Rect(0, 1240, 677, 15), 2.46677136f);
879 } 889 }
880 890
881 } // namespace 891 } // namespace
882 } // namespace cc 892 } // namespace cc
OLDNEW
« no previous file with comments | « cc/animation/scrollbar_animation_controller_thinning_unittest.cc ('k') | cc/layers/solid_color_scrollbar_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698