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

Unified Diff: Source/platform/graphics/ImageLayerChromiumTest.cpp

Issue 1184673003: Fix unit test style in Source/platform/, part 2. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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
Index: Source/platform/graphics/ImageLayerChromiumTest.cpp
diff --git a/Source/platform/graphics/ImageLayerChromiumTest.cpp b/Source/platform/graphics/ImageLayerChromiumTest.cpp
index 229181aa7e9334a511740769ba7703c745ac77d8..e700a698ffbeb604180751152e0eb764462a25f1 100644
--- a/Source/platform/graphics/ImageLayerChromiumTest.cpp
+++ b/Source/platform/graphics/ImageLayerChromiumTest.cpp
@@ -27,28 +27,26 @@
#include "platform/graphics/GraphicsLayer.h"
#include "wtf/PassOwnPtr.h"
-
#include <gtest/gtest.h>
-using namespace blink;
+namespace blink {
namespace {
class MockGraphicsLayerClient : public GraphicsLayerClient {
public:
- virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const IntRect& inClip) override { }
- virtual String debugName(const GraphicsLayer*) override { return String(); }
+ void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const IntRect&) override { }
+ String debugName(const GraphicsLayer*) override { return String(); }
};
class TestImage : public Image {
public:
-
static PassRefPtr<TestImage> create(const IntSize& size, bool isOpaque)
{
return adoptRef(new TestImage(size, isOpaque));
}
- explicit TestImage(const IntSize& size, bool isOpaque)
+ TestImage(const IntSize& size, bool isOpaque)
: Image(0)
, m_size(size)
{
@@ -56,22 +54,22 @@ public:
m_bitmap.eraseColor(SK_ColorTRANSPARENT);
}
- virtual bool isBitmapImage() const override
+ bool isBitmapImage() const override
{
return true;
}
- virtual bool currentFrameKnownToBeOpaque() override
+ bool currentFrameKnownToBeOpaque() override
{
return m_bitmap.isOpaque();
}
- virtual IntSize size() const override
+ IntSize size() const override
{
return m_size;
}
- virtual bool bitmapForCurrentFrame(SkBitmap* bitmap) override
+ bool bitmapForCurrentFrame(SkBitmap* bitmap) override
{
if (m_size.isZero())
return false;
@@ -81,7 +79,7 @@ public:
}
// Stub implementations of pure virtual Image functions.
- virtual void destroyDecodedData(bool) override
+ void destroyDecodedData(bool) override
{
}
@@ -90,9 +88,7 @@ public:
}
private:
-
IntSize m_size;
-
SkBitmap m_bitmap;
};
@@ -101,9 +97,11 @@ public:
explicit GraphicsLayerForTesting(GraphicsLayerClient* client)
: GraphicsLayer(client) { };
- virtual WebLayer* contentsLayer() const { return GraphicsLayer::contentsLayer(); }
+ WebLayer* contentsLayer() const { return GraphicsLayer::contentsLayer(); }
};
+} // anonymous namespace
+
TEST(ImageLayerChromiumTest, imageLayerContentReset)
{
MockGraphicsLayerClient client;
@@ -145,4 +143,4 @@ TEST(ImageLayerChromiumTest, opaqueImages)
ASSERT_FALSE(graphicsLayer->contentsLayer()->opaque());
}
-} // namespace
+} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698