summaryrefslogtreecommitdiff
path: root/Source/WebKit/chromium/tests/CCScrollbarAnimationControllerLinearFadeTest.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-08-21 10:57:44 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-08-21 10:57:44 +0200
commit5ef7c8a6a70875d4430752d146bdcb069605d71d (patch)
treef6256640b6c46d7da221435803cae65326817ba2 /Source/WebKit/chromium/tests/CCScrollbarAnimationControllerLinearFadeTest.cpp
parentdecad929f578d8db641febc8740649ca6c574638 (diff)
downloadqtwebkit-5ef7c8a6a70875d4430752d146bdcb069605d71d.tar.gz
Imported WebKit commit 356d83016b090995d08ad568f2d2c243aa55e831 (http://svn.webkit.org/repository/webkit/trunk@126147)
New snapshot including various build fixes for newer Qt 5
Diffstat (limited to 'Source/WebKit/chromium/tests/CCScrollbarAnimationControllerLinearFadeTest.cpp')
-rw-r--r--Source/WebKit/chromium/tests/CCScrollbarAnimationControllerLinearFadeTest.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/Source/WebKit/chromium/tests/CCScrollbarAnimationControllerLinearFadeTest.cpp b/Source/WebKit/chromium/tests/CCScrollbarAnimationControllerLinearFadeTest.cpp
index e6cdc24c1..61e5f4400 100644
--- a/Source/WebKit/chromium/tests/CCScrollbarAnimationControllerLinearFadeTest.cpp
+++ b/Source/WebKit/chromium/tests/CCScrollbarAnimationControllerLinearFadeTest.cpp
@@ -24,10 +24,10 @@
#include "config.h"
-#include "cc/CCScrollbarAnimationControllerLinearFade.h"
+#include "CCScrollbarAnimationControllerLinearFade.h"
-#include "cc/CCScrollbarLayerImpl.h"
-#include "cc/CCSingleThreadProxy.h"
+#include "CCScrollbarLayerImpl.h"
+#include "CCSingleThreadProxy.h"
#include <gtest/gtest.h>
#include <wtf/OwnPtr.h>
@@ -84,9 +84,11 @@ TEST_F(CCScrollbarAnimationControllerLinearFadeTest, verifyAwakenByScroll)
m_scrollbarController->animate(3);
EXPECT_FLOAT_EQ(1, m_scrollbarLayer->opacity());
m_scrollbarController->animate(4);
- EXPECT_FLOAT_EQ(2 / 3.0, m_scrollbarLayer->opacity());
+ // Note that we use 3.0f to avoid "argument is truncated from 'double' to
+ // 'float'" warnings on Windows.
+ EXPECT_FLOAT_EQ(2 / 3.0f, m_scrollbarLayer->opacity());
m_scrollbarController->animate(5);
- EXPECT_FLOAT_EQ(1 / 3.0, m_scrollbarLayer->opacity());
+ EXPECT_FLOAT_EQ(1 / 3.0f, m_scrollbarLayer->opacity());
m_scrollLayer->setScrollDelta(IntSize(3, 3));
m_scrollbarController->updateScrollOffsetAtTime(m_scrollLayer.get(), 5);
m_scrollbarController->animate(6);
@@ -94,9 +96,9 @@ TEST_F(CCScrollbarAnimationControllerLinearFadeTest, verifyAwakenByScroll)
m_scrollbarController->animate(7);
EXPECT_FLOAT_EQ(1, m_scrollbarLayer->opacity());
m_scrollbarController->animate(8);
- EXPECT_FLOAT_EQ(2 / 3.0, m_scrollbarLayer->opacity());
+ EXPECT_FLOAT_EQ(2 / 3.0f, m_scrollbarLayer->opacity());
m_scrollbarController->animate(9);
- EXPECT_FLOAT_EQ(1 / 3.0, m_scrollbarLayer->opacity());
+ EXPECT_FLOAT_EQ(1 / 3.0f, m_scrollbarLayer->opacity());
m_scrollbarController->animate(10);
EXPECT_FLOAT_EQ(0, m_scrollbarLayer->opacity());
}
@@ -127,9 +129,9 @@ TEST_F(CCScrollbarAnimationControllerLinearFadeTest, verifyForceAwakenByPinch)
m_scrollbarController->animate(8);
EXPECT_FLOAT_EQ(1, m_scrollbarLayer->opacity());
m_scrollbarController->animate(9);
- EXPECT_FLOAT_EQ(2 / 3.0, m_scrollbarLayer->opacity());
+ EXPECT_FLOAT_EQ(2 / 3.0f, m_scrollbarLayer->opacity());
m_scrollbarController->animate(10);
- EXPECT_FLOAT_EQ(1 / 3.0, m_scrollbarLayer->opacity());
+ EXPECT_FLOAT_EQ(1 / 3.0f, m_scrollbarLayer->opacity());
m_scrollbarController->animate(11);
EXPECT_FLOAT_EQ(0, m_scrollbarLayer->opacity());