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

Side by Side Diff: cc/scrollbar_animation_controller_linear_fade_unittest.cc

Issue 11369071: A speculative Revert for r165872 - Remove static thread pointers from CC, attempt 2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 1 month 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/scoped_texture_unittest.cc ('k') | cc/scrollbar_layer_unittest.cc » ('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 "config.h" 5 #include "config.h"
6 6
7 #include "cc/scrollbar_animation_controller_linear_fade.h" 7 #include "cc/scrollbar_animation_controller_linear_fade.h"
8 8
9 #include "cc/scrollbar_layer_impl.h" 9 #include "cc/scrollbar_layer_impl.h"
10 #include "cc/single_thread_proxy.h" 10 #include "cc/single_thread_proxy.h"
(...skipping 12 matching lines...) Expand all
23 m_contentLayer = m_scrollLayer->children()[0]; 23 m_contentLayer = m_scrollLayer->children()[0];
24 m_scrollbarLayer = ScrollbarLayerImpl::create(3); 24 m_scrollbarLayer = ScrollbarLayerImpl::create(3);
25 25
26 m_scrollLayer->setMaxScrollPosition(IntSize(50, 50)); 26 m_scrollLayer->setMaxScrollPosition(IntSize(50, 50));
27 m_contentLayer->setBounds(IntSize(50, 50)); 27 m_contentLayer->setBounds(IntSize(50, 50));
28 28
29 m_scrollbarController = ScrollbarAnimationControllerLinearFade::create(m _scrollLayer.get(), 2, 3); 29 m_scrollbarController = ScrollbarAnimationControllerLinearFade::create(m _scrollLayer.get(), 2, 3);
30 m_scrollbarController->setHorizontalScrollbarLayer(m_scrollbarLayer.get( )); 30 m_scrollbarController->setHorizontalScrollbarLayer(m_scrollbarLayer.get( ));
31 } 31 }
32 32
33 DebugScopedSetImplThread implThread;
34
33 scoped_ptr<ScrollbarAnimationControllerLinearFade> m_scrollbarController; 35 scoped_ptr<ScrollbarAnimationControllerLinearFade> m_scrollbarController;
34 scoped_ptr<LayerImpl> m_scrollLayer; 36 scoped_ptr<LayerImpl> m_scrollLayer;
35 LayerImpl* m_contentLayer; 37 LayerImpl* m_contentLayer;
36 scoped_ptr<ScrollbarLayerImpl> m_scrollbarLayer; 38 scoped_ptr<ScrollbarLayerImpl> m_scrollbarLayer;
37 39
38 }; 40 };
39 41
40 TEST_F(ScrollbarAnimationControllerLinearFadeTest, verifyHiddenInBegin) 42 TEST_F(ScrollbarAnimationControllerLinearFadeTest, verifyHiddenInBegin)
41 { 43 {
42 m_scrollbarController->animate(0); 44 m_scrollbarController->animate(0);
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 m_scrollbarController->animate(9); 110 m_scrollbarController->animate(9);
109 EXPECT_FLOAT_EQ(2 / 3.0f, m_scrollbarLayer->opacity()); 111 EXPECT_FLOAT_EQ(2 / 3.0f, m_scrollbarLayer->opacity());
110 m_scrollbarController->animate(10); 112 m_scrollbarController->animate(10);
111 EXPECT_FLOAT_EQ(1 / 3.0f, m_scrollbarLayer->opacity()); 113 EXPECT_FLOAT_EQ(1 / 3.0f, m_scrollbarLayer->opacity());
112 m_scrollbarController->animate(11); 114 m_scrollbarController->animate(11);
113 EXPECT_FLOAT_EQ(0, m_scrollbarLayer->opacity()); 115 EXPECT_FLOAT_EQ(0, m_scrollbarLayer->opacity());
114 116
115 } 117 }
116 118
117 } 119 }
OLDNEW
« no previous file with comments | « cc/scoped_texture_unittest.cc ('k') | cc/scrollbar_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698