| 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 "config.h" | 5 #include "config.h" |
| 6 | 6 |
| 7 #include "CCScrollbarAnimationControllerLinearFade.h" | 7 #include "CCScrollbarAnimationControllerLinearFade.h" |
| 8 | 8 |
| 9 #include "CCScrollbarLayerImpl.h" | 9 #include "CCScrollbarLayerImpl.h" |
| 10 #include "CCSingleThreadProxy.h" | 10 #include "CCSingleThreadProxy.h" |
| 11 #include <gtest/gtest.h> | 11 #include <gtest/gtest.h> |
| 12 #include <wtf/OwnPtr.h> | 12 #include <wtf/OwnPtr.h> |
| 13 | 13 |
| 14 using namespace WebCore; | 14 using namespace cc; |
| 15 | 15 |
| 16 namespace { | 16 namespace { |
| 17 | 17 |
| 18 class CCScrollbarAnimationControllerLinearFadeTest : public testing::Test { | 18 class CCScrollbarAnimationControllerLinearFadeTest : public testing::Test { |
| 19 protected: | 19 protected: |
| 20 virtual void SetUp() | 20 virtual void SetUp() |
| 21 { | 21 { |
| 22 m_scrollLayer = CCLayerImpl::create(1); | 22 m_scrollLayer = CCLayerImpl::create(1); |
| 23 m_scrollLayer->addChild(CCLayerImpl::create(2)); | 23 m_scrollLayer->addChild(CCLayerImpl::create(2)); |
| 24 m_contentLayer = m_scrollLayer->children()[0].get(); | 24 m_contentLayer = m_scrollLayer->children()[0].get(); |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 m_scrollbarController->animate(9); | 111 m_scrollbarController->animate(9); |
| 112 EXPECT_FLOAT_EQ(2 / 3.0f, m_scrollbarLayer->opacity()); | 112 EXPECT_FLOAT_EQ(2 / 3.0f, m_scrollbarLayer->opacity()); |
| 113 m_scrollbarController->animate(10); | 113 m_scrollbarController->animate(10); |
| 114 EXPECT_FLOAT_EQ(1 / 3.0f, m_scrollbarLayer->opacity()); | 114 EXPECT_FLOAT_EQ(1 / 3.0f, m_scrollbarLayer->opacity()); |
| 115 m_scrollbarController->animate(11); | 115 m_scrollbarController->animate(11); |
| 116 EXPECT_FLOAT_EQ(0, m_scrollbarLayer->opacity()); | 116 EXPECT_FLOAT_EQ(0, m_scrollbarLayer->opacity()); |
| 117 | 117 |
| 118 } | 118 } |
| 119 | 119 |
| 120 } | 120 } |
| OLD | NEW |