aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar junov@chromium.org <junov@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-02-23 14:59:22 +0000
committerGravatar junov@chromium.org <junov@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-02-23 14:59:22 +0000
commitdadcfdc92982498344a15ad38cc213504aebd372 (patch)
treebdfa731d84540781e17582f3656ff1cca87471e5 /tests
parent53aab7813ca20360426524361941cf43567fc7ae (diff)
Fixing Canvas unit test to correctly verify object flattening in SkPicture
Diffstat (limited to 'tests')
-rw-r--r--tests/CanvasTest.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/tests/CanvasTest.cpp b/tests/CanvasTest.cpp
index 313b9cff85..099146f2dd 100644
--- a/tests/CanvasTest.cpp
+++ b/tests/CanvasTest.cpp
@@ -501,6 +501,9 @@ private:
!referenceRecord->fPathHeap ==
!testRecord->fPathHeap,
testStep->assertMessage());
+ // The following tests are commented out because they currently
+ // fail. Issue: http://code.google.com/p/skia/issues/detail?id=507
+ /*
if (referenceRecord->fPathHeap) {
REPORTER_ASSERT_MESSAGE(reporter,
referenceRecord->fPathHeap->count() ==
@@ -512,6 +515,7 @@ private:
(*testRecord->fPathHeap)[i], testStep->assertMessage());
}
}
+ */
}
@@ -583,25 +587,19 @@ public:
kHeight);
testStep->draw(referenceCanvas, reporter);
SkPicture testPicture;
- SkCanvas* testCanvas = referencePicture.beginRecording(kWidth,
+ SkCanvas* testCanvas = testPicture.beginRecording(kWidth,
kHeight);
- testStep->draw(referencePicture.beginRecording(kWidth, kHeight),
- reporter);
+ testStep->draw(testCanvas, reporter);
testStep->setAssertMessageFormat(kPictureSecondDrawAssertMessageFormat);
- testStep->draw(referencePicture.beginRecording(kWidth, kHeight),
- reporter);
+ testStep->draw(testCanvas, reporter);
SkPictureRecord* referenceRecord = static_cast<SkPictureRecord*>(
referenceCanvas);
SkPictureRecord* testRecord = static_cast<SkPictureRecord*>(
testCanvas);
- // The following test currently fails on linux
- // Issue: http://code.google.com/p/skia/issues/detail?id=507
-#if !defined(SK_BUILD_FOR_UNIX)
testStep->setAssertMessageFormat(kPictureResourceReuseMessageFormat);
AssertFlattenedObjectsEqual(referenceRecord, testRecord,
reporter, testStep);
-#endif
}
};