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

Unified Diff: cc/CCSolidColorLayerImplTest.cpp

Issue 11108020: [cc] Change cc_tests.gyp filenames to Chromium style (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 2 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 | « cc/CCScrollbarAnimationControllerLinearFadeTest.cpp ('k') | cc/CCTextureUpdateControllerTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « cc/CCScrollbarAnimationControllerLinearFadeTest.cpp ('k') | cc/CCTextureUpdateControllerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698