aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar junov@chromium.org <junov@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-12-10 21:24:38 +0000
committerGravatar junov@chromium.org <junov@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-12-10 21:24:38 +0000
commit41e850f07454172dbe1504f2c1190a6fa5f0cf95 (patch)
tree79d5cbb71cd4722621583912f111f8c35264d98c /tests
parent1adad343b9ee010a5adc07a369bd98cb25062e5d (diff)
Fixing logic error in deferred canvas unittest.
Fixing an inverted test condition. The tested feature is not broken, but the test was passing the inverted test because code just above was missing a restore call, which was affecting the test. Review URL: https://codereview.appspot.com/6921044 git-svn-id: http://skia.googlecode.com/svn/trunk@6745 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests')
-rw-r--r--tests/DeferredCanvasTest.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/DeferredCanvasTest.cpp b/tests/DeferredCanvasTest.cpp
index 6cc3b08b4f..d527ea3084 100644
--- a/tests/DeferredCanvasTest.cpp
+++ b/tests/DeferredCanvasTest.cpp
@@ -163,6 +163,7 @@ static void TestDeferredCanvasFreshFrame(skiatest::Reporter* reporter) {
paint.setStyle(SkPaint::kFill_Style);
paint.setAlpha(255);
canvas.drawRect(fullRect, paint);
+ canvas.restore();
REPORTER_ASSERT(reporter, !canvas.isFreshFrame());
}
@@ -182,7 +183,7 @@ static void TestDeferredCanvasFreshFrame(skiatest::Reporter* reporter) {
paint.setAlpha( 100 );
paint.setXfermodeMode(SkXfermode::kSrc_Mode);
canvas.drawRect(fullRect, paint);
- REPORTER_ASSERT(reporter, !canvas.isFreshFrame());
+ REPORTER_ASSERT(reporter, canvas.isFreshFrame());
}
}