summaryrefslogtreecommitdiff
path: root/Source/WebKit/chromium/tests/WebLayerTreeViewTest.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-09-10 19:10:20 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-09-10 19:10:20 +0200
commit284837daa07b29d6a63a748544a90b1f5842ac5c (patch)
treeecd258180bde91fe741e0cfd2638beb3c6da7e8e /Source/WebKit/chromium/tests/WebLayerTreeViewTest.cpp
parent2e2ba8ff45915f40ed3e014101269c175f2a89a0 (diff)
downloadqtwebkit-284837daa07b29d6a63a748544a90b1f5842ac5c.tar.gz
Imported WebKit commit 68645295d2e3e09af2c942f092556f06aa5f8b0d (http://svn.webkit.org/repository/webkit/trunk@128073)
New snapshot
Diffstat (limited to 'Source/WebKit/chromium/tests/WebLayerTreeViewTest.cpp')
-rw-r--r--Source/WebKit/chromium/tests/WebLayerTreeViewTest.cpp25
1 files changed, 13 insertions, 12 deletions
diff --git a/Source/WebKit/chromium/tests/WebLayerTreeViewTest.cpp b/Source/WebKit/chromium/tests/WebLayerTreeViewTest.cpp
index 1c1602c23..c136e01be 100644
--- a/Source/WebKit/chromium/tests/WebLayerTreeViewTest.cpp
+++ b/Source/WebKit/chromium/tests/WebLayerTreeViewTest.cpp
@@ -31,10 +31,12 @@
#include "WebLayerTreeViewTestCommon.h"
#include <gmock/gmock.h>
#include <public/Platform.h>
-#include <public/WebCompositor.h>
+#include <public/WebCompositorSupport.h>
#include <public/WebLayer.h>
#include <public/WebLayerTreeViewClient.h>
#include <public/WebThread.h>
+#include <wtf/RefCounted.h>
+#include <wtf/RefPtr.h>
using namespace WebKit;
using testing::Mock;
@@ -61,35 +63,34 @@ public:
{
initializeCompositor();
m_rootLayer = adoptPtr(WebLayer::create());
- EXPECT_TRUE(m_view.initialize(client(), *m_rootLayer, WebLayerTreeView::Settings()));
- m_view.setSurfaceReady();
+ ASSERT_TRUE(m_view = adoptPtr(WebLayerTreeView::create(client(), *m_rootLayer, WebLayerTreeView::Settings())));
+ m_view->setSurfaceReady();
}
virtual void TearDown()
{
Mock::VerifyAndClearExpectations(client());
- m_view.setRootLayer(0);
m_rootLayer.clear();
- m_view.reset();
- WebKit::WebCompositor::shutdown();
+ m_view.clear();
+ WebKit::Platform::current()->compositorSupport()->shutdown();
}
protected:
OwnPtr<WebLayer> m_rootLayer;
- WebLayerTreeView m_view;
+ OwnPtr<WebLayerTreeView> m_view;
};
class WebLayerTreeViewSingleThreadTest : public WebLayerTreeViewTestBase {
protected:
void composite()
{
- m_view.composite();
+ m_view->composite();
}
virtual void initializeCompositor() OVERRIDE
{
- WebKit::WebCompositor::initialize(0);
+ WebKit::Platform::current()->compositorSupport()->initialize(0);
}
virtual WebLayerTreeViewClient* client() OVERRIDE
@@ -157,18 +158,18 @@ protected:
void composite()
{
- m_view.setNeedsRedraw();
+ m_view->setNeedsRedraw();
RefPtr<CancelableTaskWrapper> timeoutTask = adoptRef(new CancelableTaskWrapper(adoptPtr(new TimeoutTask())));
WebKit::Platform::current()->currentThread()->postDelayedTask(timeoutTask->createTask(), 5000);
WebKit::Platform::current()->currentThread()->enterRunLoop();
timeoutTask->cancel();
- m_view.finishAllRendering();
+ m_view->finishAllRendering();
}
virtual void initializeCompositor() OVERRIDE
{
m_webThread = adoptPtr(WebKit::Platform::current()->createThread("WebLayerTreeViewTest"));
- WebCompositor::initialize(m_webThread.get());
+ WebKit::Platform::current()->compositorSupport()->initialize(m_webThread.get());
}
virtual WebLayerTreeViewClient* client() OVERRIDE