diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-09-10 19:10:20 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-09-10 19:10:20 +0200 |
commit | 284837daa07b29d6a63a748544a90b1f5842ac5c (patch) | |
tree | ecd258180bde91fe741e0cfd2638beb3c6da7e8e /Source/WebKit/chromium/tests/CCThreadedTest.cpp | |
parent | 2e2ba8ff45915f40ed3e014101269c175f2a89a0 (diff) | |
download | qtwebkit-284837daa07b29d6a63a748544a90b1f5842ac5c.tar.gz |
Imported WebKit commit 68645295d2e3e09af2c942f092556f06aa5f8b0d (http://svn.webkit.org/repository/webkit/trunk@128073)
New snapshot
Diffstat (limited to 'Source/WebKit/chromium/tests/CCThreadedTest.cpp')
-rw-r--r-- | Source/WebKit/chromium/tests/CCThreadedTest.cpp | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/Source/WebKit/chromium/tests/CCThreadedTest.cpp b/Source/WebKit/chromium/tests/CCThreadedTest.cpp index cde88f8e6..a74e8e03a 100644 --- a/Source/WebKit/chromium/tests/CCThreadedTest.cpp +++ b/Source/WebKit/chromium/tests/CCThreadedTest.cpp @@ -28,6 +28,7 @@ #include "CCActiveAnimation.h" #include "CCAnimationTestCommon.h" +#include "CCInputHandler.h" #include "CCLayerAnimationController.h" #include "CCLayerImpl.h" #include "CCLayerTreeHostImpl.h" @@ -44,7 +45,7 @@ #include "LayerChromium.h" #include <gmock/gmock.h> #include <public/Platform.h> -#include <public/WebCompositor.h> +#include <public/WebCompositorSupport.h> #include <public/WebFilterOperation.h> #include <public/WebFilterOperations.h> #include <public/WebThread.h> @@ -56,7 +57,6 @@ using namespace WebCore; using namespace WebKit; -using namespace WTF; namespace WebKitTests { @@ -208,9 +208,9 @@ public: { } - virtual void updateAnimations(double monotonicTime) OVERRIDE + virtual void animate(double monotonicTime) OVERRIDE { - m_testHooks->updateAnimations(monotonicTime); + m_testHooks->animate(monotonicTime); } virtual void layout() OVERRIDE @@ -228,6 +228,16 @@ public: return m_testHooks->createOutputSurface(); } + virtual void didRecreateOutputSurface(bool succeeded) OVERRIDE + { + m_testHooks->didRecreateOutputSurface(succeeded); + } + + virtual PassOwnPtr<CCInputHandler> createInputHandler() OVERRIDE + { + return nullptr; + } + virtual void willCommit() OVERRIDE { } @@ -246,11 +256,6 @@ public: { } - virtual void didRecreateOutputSurface(bool succeeded) OVERRIDE - { - m_testHooks->didRecreateOutputSurface(succeeded); - } - virtual void scheduleComposite() OVERRIDE { m_testHooks->scheduleComposite(); @@ -601,17 +606,19 @@ void CCThreadedTest::dispatchDidAddAnimation(void* self) void CCThreadedTest::runTest(bool threaded) { // For these tests, we will enable threaded animations. - WebCompositor::setAcceleratedAnimationEnabled(true); + Platform::current()->compositorSupport()->setAcceleratedAnimationEnabled(true); if (threaded) { m_webThread = adoptPtr(WebKit::Platform::current()->createThread("CCThreadedTest")); - WebCompositor::initialize(m_webThread.get()); + Platform::current()->compositorSupport()->initialize(m_webThread.get()); } else - WebCompositor::initialize(0); + Platform::current()->compositorSupport()->initialize(0); ASSERT(CCProxy::isMainThread()); m_mainThreadProxy = CCScopedThreadProxy::create(CCProxy::mainThread()); + initializeSettings(m_settings); + m_beginTask = new BeginTask(this); WebKit::Platform::current()->currentThread()->postDelayedTask(m_beginTask, 0); // postDelayedTask takes ownership of the task m_timeoutTask = new TimeoutTask(this); @@ -632,11 +639,11 @@ void CCThreadedTest::runTest(bool threaded) m_client.clear(); if (m_timedOut) { FAIL() << "Test timed out"; - WebCompositor::shutdown(); + Platform::current()->compositorSupport()->shutdown(); return; } afterTest(); - WebCompositor::shutdown(); + Platform::current()->compositorSupport()->shutdown(); } } // namespace WebKitTests |