diff options
Diffstat (limited to 'tests/PathTest.cpp')
-rw-r--r-- | tests/PathTest.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/PathTest.cpp b/tests/PathTest.cpp index 2ec54d79fa..960cdc3b16 100644 --- a/tests/PathTest.cpp +++ b/tests/PathTest.cpp @@ -3712,6 +3712,20 @@ DEF_TEST(Paths, reporter) { p.addRect(bounds); REPORTER_ASSERT(reporter, !p.isRect(NULL)); + // Test an edge case w.r.t. the bound returned by isRect (i.e., the + // path has a trailing moveTo. Please see crbug.com\445368) + { + SkRect r; + p.reset(); + p.addRect(bounds); + REPORTER_ASSERT(reporter, p.isRect(&r)); + REPORTER_ASSERT(reporter, r == bounds); + // add a moveTo outside of our bounds + p.moveTo(bounds.fLeft + 10, bounds.fBottom + 10); + REPORTER_ASSERT(reporter, p.isRect(&r)); + REPORTER_ASSERT(reporter, r == bounds); + } + test_operatorEqual(reporter); test_isLine(reporter); test_isRect(reporter); |