diff options
Diffstat (limited to 'tests/DashPathEffectTest.cpp')
-rw-r--r-- | tests/DashPathEffectTest.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/tests/DashPathEffectTest.cpp b/tests/DashPathEffectTest.cpp index 68fce9a142..fa2395ef75 100644 --- a/tests/DashPathEffectTest.cpp +++ b/tests/DashPathEffectTest.cpp @@ -12,20 +12,15 @@ #include "SkStrokeRec.h" // crbug.com/348821 was rooted in SkDashPathEffect refusing to flatten and unflatten itself when -// fInitialDashLength < 0 (a signal the effect is nonsense). Here we test that it flattens. +// the effect is nonsense. Here we test that it fails when passed nonsense parameters. DEF_TEST(DashPathEffectTest_crbug_348821, r) { SkScalar intervals[] = { 1.76934361e+36f, 2.80259693e-45f }; // Values from bug. const int count = 2; - SkScalar phase = SK_ScalarInfinity; // Used to force the bad fInitialDashLength = -1 path. + SkScalar phase = SK_ScalarInfinity; // Used to force a nonsense effect. SkAutoTUnref<SkPathEffect> dash(SkDashPathEffect::Create(intervals, count, phase)); - // nullptr -> refuses to work with flattening framework. - REPORTER_ASSERT(r, dash->getFactory() != nullptr); - - SkWriteBuffer buffer; - buffer.writeFlattenable(dash); - REPORTER_ASSERT(r, buffer.bytesWritten() > 12); // We'd write 12 if broken, >=40 if not. + REPORTER_ASSERT(r, dash == nullptr); } // Test out the asPoint culling behavior. |