summaryrefslogtreecommitdiff
path: root/Source/WebKit/chromium/tests/WebLayerTreeViewTest.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/WebLayerTreeViewTest.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/WebLayerTreeViewTest.cpp')
-rw-r--r--Source/WebKit/chromium/tests/WebLayerTreeViewTest.cpp30
1 files changed, 5 insertions, 25 deletions
diff --git a/Source/WebKit/chromium/tests/WebLayerTreeViewTest.cpp b/Source/WebKit/chromium/tests/WebLayerTreeViewTest.cpp
index 4f0330035..1c1602c23 100644
--- a/Source/WebKit/chromium/tests/WebLayerTreeViewTest.cpp
+++ b/Source/WebKit/chromium/tests/WebLayerTreeViewTest.cpp
@@ -28,6 +28,7 @@
#include "CompositorFakeWebGraphicsContext3D.h"
#include "FakeWebCompositorOutputSurface.h"
+#include "WebLayerTreeViewTestCommon.h"
#include <gmock/gmock.h>
#include <public/Platform.h>
#include <public/WebCompositor.h>
@@ -41,27 +42,6 @@ using testing::Test;
namespace {
-class MockWebLayerTreeViewClient : public WebLayerTreeViewClient {
-public:
- virtual void scheduleComposite() OVERRIDE { }
- virtual void updateAnimations(double frameBeginTime) OVERRIDE { }
- MOCK_METHOD0(willBeginFrame, void());
- MOCK_METHOD0(didBeginFrame, void());
- virtual void layout() OVERRIDE { }
- virtual void applyScrollAndScale(const WebSize& scrollDelta, float scaleFactor) OVERRIDE { }
-
- virtual WebCompositorOutputSurface* createOutputSurface() OVERRIDE
- {
- return FakeWebCompositorOutputSurface::create(CompositorFakeWebGraphicsContext3D::create(WebGraphicsContext3D::Attributes())).leakPtr();
- }
- virtual void didRecreateOutputSurface(bool) OVERRIDE { }
-
- MOCK_METHOD0(willCommit, void());
- MOCK_METHOD0(didCommit, void());
- virtual void didCommitAndDrawFrame() OVERRIDE { }
- virtual void didCompleteSwapBuffers() OVERRIDE { }
-};
-
class MockWebLayerTreeViewClientForThreadedTests : public MockWebLayerTreeViewClient {
public:
virtual void didBeginFrame() OVERRIDE
@@ -80,8 +60,8 @@ public:
virtual void SetUp()
{
initializeCompositor();
- m_rootLayer = WebLayer::create();
- EXPECT_TRUE(m_view.initialize(client(), m_rootLayer, WebLayerTreeView::Settings()));
+ m_rootLayer = adoptPtr(WebLayer::create());
+ EXPECT_TRUE(m_view.initialize(client(), *m_rootLayer, WebLayerTreeView::Settings()));
m_view.setSurfaceReady();
}
@@ -90,13 +70,13 @@ public:
Mock::VerifyAndClearExpectations(client());
m_view.setRootLayer(0);
- m_rootLayer.reset();
+ m_rootLayer.clear();
m_view.reset();
WebKit::WebCompositor::shutdown();
}
protected:
- WebLayer m_rootLayer;
+ OwnPtr<WebLayer> m_rootLayer;
WebLayerTreeView m_view;
};