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

Unified Diff: webkit/compositor/TextureCopierTest.cpp

Issue 10920056: Make cc_unittests and webkit_compositor_unittests executable always (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rename to webkit_compositor_bindings 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/PlatformGestureCurveTarget.h ('k') | webkit/compositor/TextureLayerChromiumTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/compositor/TextureCopierTest.cpp
diff --git a/webkit/compositor/TextureCopierTest.cpp b/webkit/compositor/TextureCopierTest.cpp
deleted file mode 100644
index c2382d20f5c4599078c56f2930fc50054c7169e8..0000000000000000000000000000000000000000
--- a/webkit/compositor/TextureCopierTest.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright 2011 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.
-
-#include "config.h"
-
-#include "TextureCopier.h"
-
-#include "FakeWebGraphicsContext3D.h"
-#include "GraphicsContext3D.h"
-#include <gmock/gmock.h>
-#include <gtest/gtest.h>
-#include <wtf/RefPtr.h>
-
-using namespace WebCore;
-using namespace WebKit;
-using testing::InSequence;
-using testing::Test;
-using testing::_;
-
-class MockContext : public FakeWebGraphicsContext3D {
-public:
- MOCK_METHOD2(bindFramebuffer, void(WGC3Denum, WebGLId));
- MOCK_METHOD3(texParameteri, void(WGC3Denum target, WGC3Denum pname, WGC3Dint param));
-
- MOCK_METHOD3(drawArrays, void(WGC3Denum mode, WGC3Dint first, WGC3Dsizei count));
-};
-
-TEST(TextureCopierTest, testDrawArraysCopy)
-{
- OwnPtr<MockContext> mockContext = adoptPtr(new MockContext);
-
- {
- InSequence sequence;
-
- // Here we check just some essential properties of copyTexture() to avoid mirroring the full implementation.
- EXPECT_CALL(*mockContext, bindFramebuffer(GraphicsContext3D::FRAMEBUFFER, _));
-
- // Make sure linear filtering is disabled during the copy.
- EXPECT_CALL(*mockContext, texParameteri(GraphicsContext3D::TEXTURE_2D, GraphicsContext3D::TEXTURE_MIN_FILTER, GraphicsContext3D::NEAREST));
- EXPECT_CALL(*mockContext, texParameteri(GraphicsContext3D::TEXTURE_2D, GraphicsContext3D::TEXTURE_MAG_FILTER, GraphicsContext3D::NEAREST));
-
- EXPECT_CALL(*mockContext, drawArrays(_, _, _));
-
- // Linear filtering should be restored.
- EXPECT_CALL(*mockContext, texParameteri(GraphicsContext3D::TEXTURE_2D, GraphicsContext3D::TEXTURE_MIN_FILTER, GraphicsContext3D::LINEAR));
- EXPECT_CALL(*mockContext, texParameteri(GraphicsContext3D::TEXTURE_2D, GraphicsContext3D::TEXTURE_MAG_FILTER, GraphicsContext3D::LINEAR));
-
- // Default framebuffer should be restored
- EXPECT_CALL(*mockContext, bindFramebuffer(GraphicsContext3D::FRAMEBUFFER, 0));
- }
-
- int sourceTextureId = 1;
- int destTextureId = 2;
- IntSize size(256, 128);
- OwnPtr<AcceleratedTextureCopier> copier(AcceleratedTextureCopier::create(mockContext.get(), false));
- TextureCopier::Parameters copy = { sourceTextureId, destTextureId, size };
- copier->copyTexture(copy);
-}
« no previous file with comments | « webkit/compositor/PlatformGestureCurveTarget.h ('k') | webkit/compositor/TextureLayerChromiumTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698