aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/ImageTest.cpp
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2016-08-05 13:19:01 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-08-05 13:19:01 -0700
commitae2964452bd679ca34b275911a9d0d01a35983b9 (patch)
tree44dd2199dcd4c1f8ed7caccde715cefd6fb91e71 /tests/ImageTest.cpp
parent300405a7a21aea994061fc0fabaf13465fb31f09 (diff)
update Image_MakeFromRasterBitmap to check uniqueIDs
Diffstat (limited to 'tests/ImageTest.cpp')
-rw-r--r--tests/ImageTest.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/ImageTest.cpp b/tests/ImageTest.cpp
index 14b55a421a..ca4788c449 100644
--- a/tests/ImageTest.cpp
+++ b/tests/ImageTest.cpp
@@ -211,6 +211,7 @@ DEF_TEST(Image_MakeFromRasterBitmap, reporter) {
REPORTER_ASSERT(reporter, img->peekPixels(&pm));
const bool sameMutable = pm.addr32(0, 0) == bm.getAddr32(0, 0);
REPORTER_ASSERT(reporter, rec.fExpectSameAsMutable == sameMutable);
+ REPORTER_ASSERT(reporter, (bm.getGenerationID() == img->uniqueID()) == sameMutable);
bm.notifyPixelsChanged(); // force a new generation ID
@@ -219,6 +220,7 @@ DEF_TEST(Image_MakeFromRasterBitmap, reporter) {
REPORTER_ASSERT(reporter, img->peekPixels(&pm));
const bool sameImmutable = pm.addr32(0, 0) == bm.getAddr32(0, 0);
REPORTER_ASSERT(reporter, rec.fExpectSameAsImmutable == sameImmutable);
+ REPORTER_ASSERT(reporter, (bm.getGenerationID() == img->uniqueID()) == sameImmutable);
}
}