Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(322)

Unified Diff: tests/PathTest.cpp

Issue 2021343004: Add a test for crbug 613918 and fix a style issue. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Minimize test and add a comment Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkPath.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PathTest.cpp
diff --git a/tests/PathTest.cpp b/tests/PathTest.cpp
index f4b488b1f904066aa069d969cdb110047db8f9fa..01d0b808c5c770719184e1957edab760641438e7 100644
--- a/tests/PathTest.cpp
+++ b/tests/PathTest.cpp
@@ -484,6 +484,17 @@ static void test_crbug_495894(skiatest::Reporter* reporter) {
65536);
}
+static void test_crbug_613918() {
+ SkPath path;
+ path.conicTo(-6.62478e-08f, 4.13885e-08f, -6.36935e-08f, 3.97927e-08f, 0.729058f);
+ path.quadTo(2.28206e-09f, -1.42572e-09f, 3.91919e-09f, -2.44852e-09f);
+ path.cubicTo(-16752.2f, -26792.9f, -21.4673f, 10.9347f, -8.57322f, -7.22739f);
+
+ // This call could lead to an assert or uninitialized read due to a failure
+ // to check the return value from SkCubicClipper::ChopMonoAtY.
+ path.contains(-1.84817e-08f, 1.15465e-08f);
+}
+
static void test_addrect(skiatest::Reporter* reporter) {
SkPath path;
path.lineTo(0, 0);
@@ -4179,6 +4190,7 @@ DEF_TEST(Paths, reporter) {
test_crbug_170666();
test_crbug_493450(reporter);
test_crbug_495894(reporter);
+ test_crbug_613918();
test_bad_cubic_crbug229478();
test_bad_cubic_crbug234190();
test_gen_id(reporter);
« no previous file with comments | « src/core/SkPath.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698