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

Unified Diff: Source/platform/graphics/RecordingImageBufferSurfaceTest.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/RecordingImageBufferSurfaceTest.cpp
diff --git a/Source/platform/graphics/RecordingImageBufferSurfaceTest.cpp b/Source/platform/graphics/RecordingImageBufferSurfaceTest.cpp
index b620a920c99400372d85b120be6f89e27fc4fd9a..96a06761e3ceefdb6fdfff7a88520030389b9328 100644
--- a/Source/platform/graphics/RecordingImageBufferSurfaceTest.cpp
+++ b/Source/platform/graphics/RecordingImageBufferSurfaceTest.cpp
@@ -3,7 +3,6 @@
// found in the LICENSE file.
#include "config.h"
-
#include "platform/graphics/RecordingImageBufferSurface.h"
#include "platform/graphics/GraphicsContext.h"
@@ -18,14 +17,12 @@
#include "wtf/OwnPtr.h"
#include "wtf/PassOwnPtr.h"
#include "wtf/RefPtr.h"
-
#include <gmock/gmock.h>
#include <gtest/gtest.h>
-using namespace blink;
using testing::Test;
-namespace {
+namespace blink {
class FakeImageBufferClient : public ImageBufferClient, public WebThread::TaskObserver {
public:
@@ -35,12 +32,12 @@ public:
, m_frameCount(0)
{ }
- virtual ~FakeImageBufferClient() { }
+ ~FakeImageBufferClient() override { }
// ImageBufferClient implementation
- virtual void notifySurfaceInvalid() override { }
- virtual bool isDirty() override { return m_isDirty; };
- virtual void didFinalizeFrame() override
+ void notifySurfaceInvalid() override { }
+ bool isDirty() override { return m_isDirty; };
+ void didFinalizeFrame() override
{
if (m_isDirty) {
Platform::current()->currentThread()->removeTaskObserver(this);
@@ -50,15 +47,15 @@ public:
}
// TaskObserver implementation
- virtual void willProcessTask() override { ASSERT_NOT_REACHED(); }
- virtual void didProcessTask() override
+ void willProcessTask() override { ASSERT_NOT_REACHED(); }
+ void didProcessTask() override
{
ASSERT_TRUE(m_isDirty);
FloatRect dirtyRect(0, 0, 1, 1);
m_imageBuffer->finalizeFrame(dirtyRect);
ASSERT_FALSE(m_isDirty);
}
- virtual void restoreCanvasMatrixClipStack() override { };
+ void restoreCanvasMatrixClipStack() override { };
void fakeDraw()
{
@@ -94,8 +91,6 @@ private:
int m_createSurfaceCount;
};
-} // unnamed namespace
-
class RecordingImageBufferSurfaceTest : public Test {
protected:
RecordingImageBufferSurfaceTest()
@@ -332,6 +327,7 @@ private:
Platform* m_oldPlatform;
};
+} // anonymous namespace
#define DEFINE_TEST_TASK_WRAPPER_CLASS(TEST_METHOD) \
class TestWrapperTask_ ## TEST_METHOD : public WebThread::Task { \
@@ -397,4 +393,4 @@ TEST_F(RecordingImageBufferSurfaceTest, testClearRect)
expectDisplayListEnabled(true);
}
-} // namespace
+} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698