Index: cc/CCSolidColorLayerImplTest.cpp |
diff --git a/cc/CCSolidColorLayerImplTest.cpp b/cc/CCSolidColorLayerImplTest.cpp |
deleted file mode 100644 |
index f1e091f6458614fb3ad46e4b6867f6df1cf1881f..0000000000000000000000000000000000000000 |
--- a/cc/CCSolidColorLayerImplTest.cpp |
+++ /dev/null |
@@ -1,93 +0,0 @@ |
-// 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. |
- |
-#include "config.h" |
- |
-#include "CCSolidColorLayerImpl.h" |
- |
-#include "CCAppendQuadsData.h" |
-#include "CCLayerTestCommon.h" |
-#include "CCSingleThreadProxy.h" |
-#include "CCSolidColorDrawQuad.h" |
-#include "MockCCQuadCuller.h" |
-#include "testing/gmock/include/gmock/gmock.h" |
-#include "testing/gtest/include/gtest/gtest.h" |
- |
-using namespace cc; |
-using namespace CCLayerTestCommon; |
- |
-namespace { |
- |
-TEST(CCSolidColorLayerImplTest, verifyTilingCompleteAndNoOverlap) |
-{ |
- DebugScopedSetImplThread scopedImplThread; |
- |
- MockCCQuadCuller quadCuller; |
- IntSize layerSize = IntSize(800, 600); |
- IntRect visibleContentRect = IntRect(IntPoint(), layerSize); |
- |
- scoped_ptr<CCSolidColorLayerImpl> layer = CCSolidColorLayerImpl::create(1); |
- layer->setVisibleContentRect(visibleContentRect); |
- layer->setBounds(layerSize); |
- layer->setContentBounds(layerSize); |
- layer->createRenderSurface(); |
- layer->setRenderTarget(layer.get()); |
- |
- CCAppendQuadsData data; |
- layer->appendQuads(quadCuller, data); |
- |
- verifyQuadsExactlyCoverRect(quadCuller.quadList(), visibleContentRect); |
-} |
- |
-TEST(CCSolidColorLayerImplTest, verifyCorrectBackgroundColorInQuad) |
-{ |
- DebugScopedSetImplThread scopedImplThread; |
- |
- SkColor testColor = 0xFFA55AFF; |
- |
- MockCCQuadCuller quadCuller; |
- IntSize layerSize = IntSize(100, 100); |
- IntRect visibleContentRect = IntRect(IntPoint(), layerSize); |
- |
- scoped_ptr<CCSolidColorLayerImpl> layer = CCSolidColorLayerImpl::create(1); |
- layer->setVisibleContentRect(visibleContentRect); |
- layer->setBounds(layerSize); |
- layer->setContentBounds(layerSize); |
- layer->setBackgroundColor(testColor); |
- layer->createRenderSurface(); |
- layer->setRenderTarget(layer.get()); |
- |
- CCAppendQuadsData data; |
- layer->appendQuads(quadCuller, data); |
- |
- ASSERT_EQ(quadCuller.quadList().size(), 1U); |
- EXPECT_EQ(CCSolidColorDrawQuad::materialCast(quadCuller.quadList()[0])->color(), testColor); |
-} |
- |
-TEST(CCSolidColorLayerImplTest, verifyCorrectOpacityInQuad) |
-{ |
- DebugScopedSetImplThread scopedImplThread; |
- |
- const float opacity = 0.5f; |
- |
- MockCCQuadCuller quadCuller; |
- IntSize layerSize = IntSize(100, 100); |
- IntRect visibleContentRect = IntRect(IntPoint(), layerSize); |
- |
- scoped_ptr<CCSolidColorLayerImpl> layer = CCSolidColorLayerImpl::create(1); |
- layer->setVisibleContentRect(visibleContentRect); |
- layer->setBounds(layerSize); |
- layer->setContentBounds(layerSize); |
- layer->setDrawOpacity(opacity); |
- layer->createRenderSurface(); |
- layer->setRenderTarget(layer.get()); |
- |
- CCAppendQuadsData data; |
- layer->appendQuads(quadCuller, data); |
- |
- ASSERT_EQ(quadCuller.quadList().size(), 1U); |
- EXPECT_EQ(opacity, CCSolidColorDrawQuad::materialCast(quadCuller.quadList()[0])->opacity()); |
-} |
- |
-} // namespace |