diff options
author | 2015-05-29 15:46:36 -0700 | |
---|---|---|
committer | 2015-05-29 15:46:36 -0700 | |
commit | 6980f5a96455c8062403c995a64b654a0e9a1319 (patch) | |
tree | fc25729404587d686e21c43d83578933cef52db7 /tests | |
parent | 3953d360417655b8000df0951699121383db45c3 (diff) |
add asserts around results from requestLock (patchset #3 id:40001 of https://codereview.chromium.org/1155403003/)"
This reverts commit 3953d360417655b8000df0951699121383db45c3.
BUG=skia:
TBR=
Review URL: https://codereview.chromium.org/1165583005
Diffstat (limited to 'tests')
-rw-r--r-- | tests/PixelRefTest.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/PixelRefTest.cpp b/tests/PixelRefTest.cpp index e13d0e07e5..30575ba8d5 100644 --- a/tests/PixelRefTest.cpp +++ b/tests/PixelRefTest.cpp @@ -1,8 +1,22 @@ +/* + * Copyright 2015 Google Inc. + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + #include "Test.h" #include "SkMallocPixelRef.h" #include "SkPixelRef.h" +static void test_install(skiatest::Reporter* reporter) { + SkImageInfo info = SkImageInfo::MakeN32Premul(0, 0); + SkBitmap bm; + // make sure we don't assert on an empty install + bm.installPixels(info, NULL, 0); +} + class TestListener : public SkPixelRef::GenIDChangeListener { public: explicit TestListener(int* ptr) : fPtr(ptr) {} @@ -43,4 +57,6 @@ DEF_TEST(PixelRef_GenIDChange, r) { REPORTER_ASSERT(r, 0 != pixelRef->getGenerationID()); pixelRef->addGenIDChangeListener(NULL); pixelRef->notifyPixelsChanged(); + + test_install(r); } |