Index: Source/platform/graphics/RecordingImageBufferSurfaceTest.cpp |
diff --git a/Source/platform/graphics/RecordingImageBufferSurfaceTest.cpp b/Source/platform/graphics/RecordingImageBufferSurfaceTest.cpp |
index 3237ea71b1cac1477f1878462693ed3db99f1c27..ca7a88880d15b7deb823a09f662fcf56644e7208 100644 |
--- a/Source/platform/graphics/RecordingImageBufferSurfaceTest.cpp |
+++ b/Source/platform/graphics/RecordingImageBufferSurfaceTest.cpp |
@@ -6,6 +6,7 @@ |
#include "platform/graphics/RecordingImageBufferSurface.h" |
+#include "platform/graphics/GraphicsContext.h" |
#include "platform/graphics/ImageBuffer.h" |
#include "third_party/skia/include/core/SkCanvas.h" |
#include "third_party/skia/include/core/SkPictureRecorder.h" |
@@ -80,6 +81,16 @@ protected: |
m_testSurface->getPicture(); |
expectDisplayListEnabled(true); |
} |
+ |
+ void testClearRect() |
+ { |
+ m_testSurface->initializeCurrentFrame(); |
+ m_testSurface->getPicture(); |
+ m_imageBuffer->context()->clearRect(FloatRect(FloatPoint(0, 0), FloatSize(m_testSurface->size()))); |
+ m_testSurface->willUse(); |
+ m_testSurface->getPicture(); |
+ expectDisplayListEnabled(true); |
+ } |
private: |
void expectDisplayListEnabled(bool displayListEnabled) |
{ |
@@ -118,4 +129,9 @@ TEST_F(RecordingImageBufferSurfaceTest, testAnimatedWithClear) |
testAnimatedWithClear(); |
} |
+TEST_F(RecordingImageBufferSurfaceTest, testClearRect) |
+{ |
+ testClearRect(); |
+} |
+ |
} // namespace |