Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1594)

Unified Diff: webkit/compositor/test/WebLayerTreeViewTestCommon.h

Issue 10909020: Enable webkit_compositor_unittests (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/compositor/test/FakeWebScrollbarThemeGeometry.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/compositor/test/WebLayerTreeViewTestCommon.h
diff --git a/webkit/compositor/test/WebLayerTreeViewTestCommon.h b/webkit/compositor/test/WebLayerTreeViewTestCommon.h
new file mode 100644
index 0000000000000000000000000000000000000000..2a81fb9290d5e7be82d0515ada4e1c36ea4b3190
--- /dev/null
+++ b/webkit/compositor/test/WebLayerTreeViewTestCommon.h
@@ -0,0 +1,38 @@
+// Copyright 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WebLayerTreeViewTestCommon_h
+#define WebLayerTreeViewTestCommon_h
+
+#include "CompositorFakeWebGraphicsContext3D.h"
+#include "FakeWebCompositorOutputSurface.h"
+#include <gmock/gmock.h>
+#include <public/WebLayerTreeViewClient.h>
+
+namespace WebKit {
+
+class MockWebLayerTreeViewClient : public WebLayerTreeViewClient {
+public:
+ MOCK_METHOD0(scheduleComposite, void());
+ 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 { }
+};
+
+}
+
+#endif // WebLayerTreeViewTestCommon_h
« no previous file with comments | « webkit/compositor/test/FakeWebScrollbarThemeGeometry.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698