diff --git a/tests/PictureTest.cpp b/tests/PictureTest.cpp
index c702e94..20226e7 100644
--- a/tests/PictureTest.cpp
+++ b/tests/PictureTest.cpp
@@ -449,6 +449,105 @@
     }
 }
 
+static void test_clip_bound_opt(skiatest::Reporter* reporter) {
+    // Test for crbug.com/229011
+    SkRect rect1 = SkRect::MakeXYWH(SkIntToScalar(4), SkIntToScalar(4),
+                                    SkIntToScalar(2), SkIntToScalar(2));
+    SkRect rect2 = SkRect::MakeXYWH(SkIntToScalar(7), SkIntToScalar(7),
+                                    SkIntToScalar(1), SkIntToScalar(1));
+    SkRect rect3 = SkRect::MakeXYWH(SkIntToScalar(6), SkIntToScalar(6),
+                                    SkIntToScalar(1), SkIntToScalar(1));
+
+    SkPath invPath;
+    invPath.addOval(rect1);
+    invPath.setFillType(SkPath::kInverseEvenOdd_FillType);
+    SkPath path;
+    path.addOval(rect2);
+    SkPath path2;
+    path2.addOval(rect3);
+    SkIRect clipBounds;
+    // Minimalist test set for 100% code coverage of
+    // SkPictureRecord::updateClipConservativelyUsingBounds
+    {
+        SkPicture picture;
+        SkCanvas* canvas = picture.beginRecording(10, 10,
+            SkPicture::kUsePathBoundsForClip_RecordingFlag);
+        canvas->clipPath(invPath, SkRegion::kIntersect_Op);
+        bool nonEmpty = canvas->getClipDeviceBounds(&clipBounds);
+        REPORTER_ASSERT(reporter, true == nonEmpty);
+        REPORTER_ASSERT(reporter, 0 == clipBounds.fLeft);
+        REPORTER_ASSERT(reporter, 0 == clipBounds.fTop);
+        REPORTER_ASSERT(reporter, 10 == clipBounds.fBottom);
+        REPORTER_ASSERT(reporter, 10 == clipBounds.fRight);
+    }
+    {
+        SkPicture picture;
+        SkCanvas* canvas = picture.beginRecording(10, 10,
+            SkPicture::kUsePathBoundsForClip_RecordingFlag);
+        canvas->clipPath(path, SkRegion::kIntersect_Op);
+        canvas->clipPath(invPath, SkRegion::kIntersect_Op);
+        bool nonEmpty = canvas->getClipDeviceBounds(&clipBounds);
+        REPORTER_ASSERT(reporter, true == nonEmpty);
+        REPORTER_ASSERT(reporter, 7 == clipBounds.fLeft);
+        REPORTER_ASSERT(reporter, 7 == clipBounds.fTop);
+        REPORTER_ASSERT(reporter, 8 == clipBounds.fBottom);
+        REPORTER_ASSERT(reporter, 8 == clipBounds.fRight);
+    }
+    {
+        SkPicture picture;
+        SkCanvas* canvas = picture.beginRecording(10, 10,
+            SkPicture::kUsePathBoundsForClip_RecordingFlag);
+        canvas->clipPath(path, SkRegion::kIntersect_Op);
+        canvas->clipPath(invPath, SkRegion::kUnion_Op);
+        bool nonEmpty = canvas->getClipDeviceBounds(&clipBounds);
+        REPORTER_ASSERT(reporter, true == nonEmpty);
+        REPORTER_ASSERT(reporter, 0 == clipBounds.fLeft);
+        REPORTER_ASSERT(reporter, 0 == clipBounds.fTop);
+        REPORTER_ASSERT(reporter, 10 == clipBounds.fBottom);
+        REPORTER_ASSERT(reporter, 10 == clipBounds.fRight);
+    }
+    {
+        SkPicture picture;
+        SkCanvas* canvas = picture.beginRecording(10, 10,
+            SkPicture::kUsePathBoundsForClip_RecordingFlag);
+        canvas->clipPath(path, SkRegion::kDifference_Op);
+        bool nonEmpty = canvas->getClipDeviceBounds(&clipBounds);
+        REPORTER_ASSERT(reporter, true == nonEmpty);
+        REPORTER_ASSERT(reporter, 0 == clipBounds.fLeft);
+        REPORTER_ASSERT(reporter, 0 == clipBounds.fTop);
+        REPORTER_ASSERT(reporter, 10 == clipBounds.fBottom);
+        REPORTER_ASSERT(reporter, 10 == clipBounds.fRight);
+    }
+    {
+        SkPicture picture;
+        SkCanvas* canvas = picture.beginRecording(10, 10,
+            SkPicture::kUsePathBoundsForClip_RecordingFlag);
+        canvas->clipPath(path, SkRegion::kReverseDifference_Op);
+        bool nonEmpty = canvas->getClipDeviceBounds(&clipBounds);
+        // True clip is actually empty in this case, but the best
+        // determination we can make using only bounds as input is that the
+        // clip is included in the bounds of 'path'.
+        REPORTER_ASSERT(reporter, true == nonEmpty);
+        REPORTER_ASSERT(reporter, 7 == clipBounds.fLeft);
+        REPORTER_ASSERT(reporter, 7 == clipBounds.fTop);
+        REPORTER_ASSERT(reporter, 8 == clipBounds.fBottom);
+        REPORTER_ASSERT(reporter, 8 == clipBounds.fRight);
+    }
+    {
+        SkPicture picture;
+        SkCanvas* canvas = picture.beginRecording(10, 10,
+            SkPicture::kUsePathBoundsForClip_RecordingFlag);
+        canvas->clipPath(path, SkRegion::kIntersect_Op);
+        canvas->clipPath(path2, SkRegion::kXOR_Op);
+        bool nonEmpty = canvas->getClipDeviceBounds(&clipBounds);
+        REPORTER_ASSERT(reporter, true == nonEmpty);
+        REPORTER_ASSERT(reporter, 6 == clipBounds.fLeft);
+        REPORTER_ASSERT(reporter, 6 == clipBounds.fTop);
+        REPORTER_ASSERT(reporter, 8 == clipBounds.fBottom);
+        REPORTER_ASSERT(reporter, 8 == clipBounds.fRight);
+    }
+}
+
 static void TestPicture(skiatest::Reporter* reporter) {
 #ifdef SK_DEBUG
     test_deleting_empty_playback();
@@ -460,6 +559,7 @@
     test_gatherpixelrefs(reporter);
     test_bitmap_with_encoded_data(reporter);
     test_clone_empty(reporter);
+    test_clip_bound_opt(reporter);
 }
 
 #include "TestClassDef.h"
